X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FImportBundle%2FImport%2FPocketImportTest.php;h=8083f1a8801a8791aaae4c1488afee9f3e9dfcb3;hb=18460b2d79125d0252e7fe71e1ae84d5ef4f040a;hp=fe59f86740708ab50e53bc842d2edf98eb835a15;hpb=f808b01692a835673f328d7221ba8c212caa9b61;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php index fe59f867..8083f1a8 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php @@ -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