aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-09-25 16:11:06 +0200
committerGitHub <noreply@github.com>2016-09-25 16:11:06 +0200
commit7e98ad962680fac17b3b90ae34b9c6e5afe7636f (patch)
tree451f2c7ec7011f1f0ee8911fb1921b02f158e1dc /tests/Wallabag/ImportBundle
parent9d7dd6b0d2480d3efff5b0ab1461f2ef99bfd57a (diff)
parent289875836a09944f5993d33753042abfef13809e (diff)
downloadwallabag-7e98ad962680fac17b3b90ae34b9c6e5afe7636f.tar.gz
wallabag-7e98ad962680fac17b3b90ae34b9c6e5afe7636f.tar.zst
wallabag-7e98ad962680fac17b3b90ae34b9c6e5afe7636f.zip
Merge pull request #2308 from wallabag/tags-duplicate
Fix duplicate tags on import
Diffstat (limited to 'tests/Wallabag/ImportBundle')
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php14
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php14
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php14
3 files changed, 42 insertions, 0 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
index 952521a2..9ec7935c 100644
--- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
@@ -41,6 +41,20 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
41 ->disableOriginalConstructor() 41 ->disableOriginalConstructor()
42 ->getMock(); 42 ->getMock();
43 43
44 $this->uow = $this->getMockBuilder('Doctrine\ORM\UnitOfWork')
45 ->disableOriginalConstructor()
46 ->getMock();
47
48 $this->em
49 ->expects($this->any())
50 ->method('getUnitOfWork')
51 ->willReturn($this->uow);
52
53 $this->uow
54 ->expects($this->any())
55 ->method('getScheduledEntityInsertions')
56 ->willReturn([]);
57
44 $pocket = new PocketImport( 58 $pocket = new PocketImport(
45 $this->em, 59 $this->em,
46 $this->contentProxy 60 $this->contentProxy
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
index 5ab4ad00..82dc4c7e 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
@@ -26,6 +26,20 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
26 ->disableOriginalConstructor() 26 ->disableOriginalConstructor()
27 ->getMock(); 27 ->getMock();
28 28
29 $this->uow = $this->getMockBuilder('Doctrine\ORM\UnitOfWork')
30 ->disableOriginalConstructor()
31 ->getMock();
32
33 $this->em
34 ->expects($this->any())
35 ->method('getUnitOfWork')
36 ->willReturn($this->uow);
37
38 $this->uow
39 ->expects($this->any())
40 ->method('getScheduledEntityInsertions')
41 ->willReturn([]);
42
29 $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy') 43 $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy')
30 ->disableOriginalConstructor() 44 ->disableOriginalConstructor()
31 ->getMock(); 45 ->getMock();
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
index 12bd6bdd..bea89efb 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
@@ -26,6 +26,20 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
26 ->disableOriginalConstructor() 26 ->disableOriginalConstructor()
27 ->getMock(); 27 ->getMock();
28 28
29 $this->uow = $this->getMockBuilder('Doctrine\ORM\UnitOfWork')
30 ->disableOriginalConstructor()
31 ->getMock();
32
33 $this->em
34 ->expects($this->any())
35 ->method('getUnitOfWork')
36 ->willReturn($this->uow);
37
38 $this->uow
39 ->expects($this->any())
40 ->method('getScheduledEntityInsertions')
41 ->willReturn([]);
42
29 $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy') 43 $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy')
30 ->disableOriginalConstructor() 44 ->disableOriginalConstructor()
31 ->getMock(); 45 ->getMock();