aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-02-19 21:21:47 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-02-19 21:21:47 +0100
commit0cde91cc6f42497844866d7631b8f28e024af965 (patch)
tree3cca40042f576a67672bde1236bd059b710f4f97 /src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
parenta8c6b8ee0cb4e77731df502a05479a8501806309 (diff)
parentc2656f96d4776c86b13d8a4c93a78ee7c4d3824c (diff)
downloadwallabag-0cde91cc6f42497844866d7631b8f28e024af965.tar.gz
wallabag-0cde91cc6f42497844866d7631b8f28e024af965.tar.zst
wallabag-0cde91cc6f42497844866d7631b8f28e024af965.zip
Merge pull request #1699 from wallabag/v2-assign-tag
Move assignTagsToEntry in ContentProxy helper
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php')
-rw-r--r--src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
index 25359d56..f44786b1 100644
--- a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
@@ -260,24 +260,10 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
260 ->method('findByUrlAndUserId') 260 ->method('findByUrlAndUserId')
261 ->will($this->onConsecutiveCalls(false, true)); 261 ->will($this->onConsecutiveCalls(false, true));
262 262
263 $tag = $this->getMockBuilder('Wallabag\CoreBundle\Entity\Tag')
264 ->disableOriginalConstructor()
265 ->getMock();
266
267 $tagRepo = $this->getMockBuilder('Wallabag\CoreBundle\Repository\TagRepository')
268 ->disableOriginalConstructor()
269 ->getMock();
270
271 $tagRepo->expects($this->exactly(2))
272 // the method `findOneByLabel` doesn't exist, EntityRepository will then call `_call` method
273 // to magically call the `findOneBy` with ['label' => 'foo']
274 ->method('__call')
275 ->will($this->onConsecutiveCalls(false, $tag));
276
277 $this->em 263 $this->em
278 ->expects($this->any()) 264 ->expects($this->exactly(2))
279 ->method('getRepository') 265 ->method('getRepository')
280 ->will($this->onConsecutiveCalls($entryRepo, $tagRepo, $tagRepo, $entryRepo)); 266 ->willReturn($entryRepo);
281 267
282 $entry = $this->getMockBuilder('Wallabag\CoreBundle\Entity\Entry') 268 $entry = $this->getMockBuilder('Wallabag\CoreBundle\Entity\Entry')
283 ->disableOriginalConstructor() 269 ->disableOriginalConstructor()