$pocketImport = $this->getPocketImport();
$this->assertEquals('Pocket', $pocketImport->getName());
- $this->assertEquals('This importer will import all your <a href="https://getpocket.com">Pocket</a> data.', $pocketImport->getDescription());
+ $this->assertNotEmpty($pocketImport->getUrl());
+ $this->assertContains('This importer will import all your Pocket data.', $pocketImport->getDescription());
}
public function testOAuthRequest()
->getMock();
$entryRepo->expects($this->exactly(2))
- ->method('existByUrlAndUserId')
+ ->method('findByUrlAndUserId')
->will($this->onConsecutiveCalls(false, true));
$tag = $this->getMockBuilder('Wallabag\CoreBundle\Entity\Tag')
->getMock();
$tagRepo->expects($this->exactly(2))
- ->method('findOneByLabelAndUserId')
+ // the method `findOneByLabel` doesn't exist, EntityRepository will then call `_call` method
+ // to magically call the `findOneBy` with ['label' => 'foo']
+ ->method('__call')
->will($this->onConsecutiveCalls(false, $tag));
$this->em