]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
Use scheduled entity insertions to avoid tag duplicate
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Import / WallabagV1ImportTest.php
index 5ab4ad008738d977b0dbe17c9d8db64325c0103a..82dc4c7e129ac83fe102efe76f7aaac7f37f6814 100644 (file)
@@ -26,6 +26,20 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
+        $this->uow = $this->getMockBuilder('Doctrine\ORM\UnitOfWork')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->em
+            ->expects($this->any())
+            ->method('getUnitOfWork')
+            ->willReturn($this->uow);
+
+        $this->uow
+            ->expects($this->any())
+            ->method('getScheduledEntityInsertions')
+            ->willReturn([]);
+
         $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy')
             ->disableOriginalConstructor()
             ->getMock();