X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FTests%2FImport%2FPocketImportTest.php;h=25359d56bb1b7d7db5c1bb6dec3012972d960b36;hb=7a97c7d06fa96a4f2d8bb17817dc15b091698e80;hp=043b2114e802711e46666c8e6df42fa4e0333921;hpb=b88cf91fc8371194df78e690983c61ea94f266cd;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php index 043b2114..25359d56 100644 --- a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php +++ b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php @@ -55,11 +55,20 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); + $config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config') + ->disableOriginalConstructor() + ->getMock(); + + $config->expects($this->any()) + ->method('get') + ->with('pocket_consumer_key') + ->willReturn($consumerKey); + $pocket = new PocketImportMock( $this->tokenStorage, $this->em, $this->contentProxy, - $consumerKey + $config ); $this->logHandler = new TestHandler(); @@ -248,7 +257,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase ->getMock(); $entryRepo->expects($this->exactly(2)) - ->method('existByUrlAndUserId') + ->method('findByUrlAndUserId') ->will($this->onConsecutiveCalls(false, true)); $tag = $this->getMockBuilder('Wallabag\CoreBundle\Entity\Tag')