]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Import/PocketImportTest.php
Update wallabag_user.de.yml
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Import / PocketImportTest.php
index 48fbbfb615ea7fd97abf184bee3b601635a017f1..9ec7935c9fbbdbf72d93b3ab7479ef63de428141 100644 (file)
@@ -41,6 +41,20 @@ class PocketImportTest 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([]);
+
         $pocket = new PocketImport(
             $this->em,
             $this->contentProxy
@@ -566,6 +580,8 @@ JSON;
                     "status": 1,
                     "list": {
                         "229279689": {
+                            "status": "1",
+                            "favorite": "1",
                             "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
                         }
                     }
@@ -603,6 +619,6 @@ JSON;
         $res = $pocketImport->import();
 
         $this->assertTrue($res);
-        $this->assertEquals(['skipped' => 1, 'imported' => 0, 'queued' => 0], $pocketImport->getSummary());
+        $this->assertEquals(['skipped' => 0, 'imported' => 1, 'queued' => 0], $pocketImport->getSummary());
     }
 }