diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php index 8728364b..c461168c 100644 --- a/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php +++ b/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php | |||
@@ -90,15 +90,18 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase | |||
90 | ->method('getRepository') | 90 | ->method('getRepository') |
91 | ->willReturn($entryRepo); | 91 | ->willReturn($entryRepo); |
92 | 92 | ||
93 | // check that every entry persisted are archived | ||
94 | $this->em | ||
95 | ->expects($this->any()) | ||
96 | ->method('persist') | ||
97 | ->with($this->callback(function($persistedEntry) { | ||
98 | return $persistedEntry->isArchived(); | ||
99 | })); | ||
100 | |||
93 | $res = $wallabagV2Import->setMarkAsRead(true)->import(); | 101 | $res = $wallabagV2Import->setMarkAsRead(true)->import(); |
94 | 102 | ||
95 | $this->assertTrue($res); | 103 | $this->assertTrue($res); |
96 | 104 | ||
97 | $this->em | ||
98 | ->expects($this->any()) | ||
99 | ->method('getBuilderForArchiveByUser') | ||
100 | ->willReturn($entryRepo); | ||
101 | |||
102 | $this->assertEquals(['skipped' => 0, 'imported' => 2], $wallabagV2Import->getSummary()); | 105 | $this->assertEquals(['skipped' => 0, 'imported' => 2], $wallabagV2Import->getSummary()); |
103 | } | 106 | } |
104 | 107 | ||