]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
Merge remote-tracking branch 'origin/master' into 2.1
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Import / WallabagV2ImportTest.php
index b4017f720ccb9ded0a8a184330aaa8a5264785de..bea89efbde0c6135bdfb8736c8df78030cb334a6 100644 (file)
@@ -26,6 +26,20 @@ class WallabagV2ImportTest 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();
@@ -256,6 +270,6 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
         $res = $wallabagV2Import->import();
 
         $this->assertTrue($res);
-        $this->assertEquals(['skipped' => 24, 'imported' => 0, 'queued' => 0], $wallabagV2Import->getSummary());
+        $this->assertEquals(['skipped' => 22, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
     }
 }