diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-19 14:22:20 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-19 14:22:20 +0100 |
commit | c2656f96d4776c86b13d8a4c93a78ee7c4d3824c (patch) | |
tree | e7aaddb8e35197420db96bb067fe410e40c0025c /src/Wallabag/ImportBundle/Tests | |
parent | fa64d861105bd0713acd7ac5d116353273524b4f (diff) | |
download | wallabag-c2656f96d4776c86b13d8a4c93a78ee7c4d3824c.tar.gz wallabag-c2656f96d4776c86b13d8a4c93a78ee7c4d3824c.tar.zst wallabag-c2656f96d4776c86b13d8a4c93a78ee7c4d3824c.zip |
Move assignTagsToEntry in ContentProxy helper
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests')
-rw-r--r-- | src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php | 18 |
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() |