->disableOriginalConstructor()
->getMock();
- $pocket = new WallabagV1Import($this->em);
+ $wallabag = new WallabagV1Import($this->em);
$this->logHandler = new TestHandler();
$logger = new Logger('test', array($this->logHandler));
- $pocket->setLogger($logger);
+ $wallabag->setLogger($logger);
if (false === $unsetUser) {
- $pocket->setUser($this->user);
+ $wallabag->setUser($this->user);
}
- return $pocket;
+ return $wallabag;
}
public function testInit()
->getMock();
$entryRepo->expects($this->exactly(3))
- ->method('existByUrlAndUserId')
+ ->method('findByUrlAndUserId')
->will($this->onConsecutiveCalls(false, true, false));
$this->em
$this->assertFalse($res);
$records = $this->logHandler->getRecords();
- $this->assertContains('WallabagV1Import: unable to read file', $records[0]['message']);
+ $this->assertContains('WallabagImport: unable to read file', $records[0]['message']);
$this->assertEquals('ERROR', $records[0]['level_name']);
}
$this->assertFalse($res);
$records = $this->logHandler->getRecords();
- $this->assertContains('WallabagV1Import: user is not defined', $records[0]['message']);
+ $this->assertContains('WallabagImport: user is not defined', $records[0]['message']);
$this->assertEquals('ERROR', $records[0]['level_name']);
}
}