]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Import/PocketImportTest.php
Merge remote-tracking branch 'origin/master' into 2.4
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Import / PocketImportTest.php
index fe59f86740708ab50e53bc842d2edf98eb835a15..8083f1a8801a8791aaae4c1488afee9f3e9dfcb3 100644 (file)
@@ -9,6 +9,7 @@ use GuzzleHttp\Subscriber\Mock;
 use M6Web\Component\RedisMock\RedisMockFactory;
 use Monolog\Handler\TestHandler;
 use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
 use Simpleue\Queue\RedisQueue;
 use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\CoreBundle\Entity\Entry;
@@ -16,7 +17,7 @@ use Wallabag\ImportBundle\Import\PocketImport;
 use Wallabag\ImportBundle\Redis\Producer;
 use Wallabag\UserBundle\Entity\User;
 
-class PocketImportTest extends \PHPUnit_Framework_TestCase
+class PocketImportTest extends TestCase
 {
     protected $token;
     protected $user;
@@ -225,6 +226,13 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
             ->method('getRepository')
             ->willReturn($entryRepo);
 
+        $this->em
+            ->expects($this->any())
+            ->method('persist')
+            ->with($this->callback(function ($persistedEntry) {
+                return $persistedEntry->isArchived() && $persistedEntry->isStarred();
+            }));
+
         $entry = new Entry($this->user);
 
         $this->contentProxy