diff options
Diffstat (limited to 'tests/Wallabag/ImportBundle/Import')
-rw-r--r-- | tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php index 254f0a25..25eedd1b 100644 --- a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php | |||
@@ -67,14 +67,14 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase | |||
67 | 67 | ||
68 | public function testImport() | 68 | public function testImport() |
69 | { | 69 | { |
70 | $readabilityImport = $this->getReadabilityImport(false, 24); | 70 | $readabilityImport = $this->getReadabilityImport(false, 23); |
71 | $readabilityImport->setFilepath(__DIR__.'/../fixtures/readability.json'); | 71 | $readabilityImport->setFilepath(__DIR__.'/../fixtures/readability.json'); |
72 | 72 | ||
73 | $entryRepo = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') | 73 | $entryRepo = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository') |
74 | ->disableOriginalConstructor() | 74 | ->disableOriginalConstructor() |
75 | ->getMock(); | 75 | ->getMock(); |
76 | 76 | ||
77 | $entryRepo->expects($this->exactly(24)) | 77 | $entryRepo->expects($this->exactly(23)) |
78 | ->method('findByUrlAndUserId') | 78 | ->method('findByUrlAndUserId') |
79 | ->willReturn(false); | 79 | ->willReturn(false); |
80 | 80 | ||
@@ -88,14 +88,14 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase | |||
88 | ->getMock(); | 88 | ->getMock(); |
89 | 89 | ||
90 | $this->contentProxy | 90 | $this->contentProxy |
91 | ->expects($this->exactly(24)) | 91 | ->expects($this->exactly(23)) |
92 | ->method('updateEntry') | 92 | ->method('updateEntry') |
93 | ->willReturn($entry); | 93 | ->willReturn($entry); |
94 | 94 | ||
95 | $res = $readabilityImport->import(); | 95 | $res = $readabilityImport->import(); |
96 | 96 | ||
97 | $this->assertTrue($res); | 97 | $this->assertTrue($res); |
98 | $this->assertEquals(['skipped' => 0, 'imported' => 24, 'queued' => 0], $readabilityImport->getSummary()); | 98 | $this->assertEquals(['skipped' => 0, 'imported' => 23, 'queued' => 0], $readabilityImport->getSummary()); |
99 | } | 99 | } |
100 | 100 | ||
101 | public function testImportAndMarkAllAsRead() | 101 | public function testImportAndMarkAllAsRead() |
@@ -165,7 +165,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase | |||
165 | ->getMock(); | 165 | ->getMock(); |
166 | 166 | ||
167 | $producer | 167 | $producer |
168 | ->expects($this->exactly(24)) | 168 | ->expects($this->exactly(23)) |
169 | ->method('publish'); | 169 | ->method('publish'); |
170 | 170 | ||
171 | $readabilityImport->setProducer($producer); | 171 | $readabilityImport->setProducer($producer); |
@@ -173,7 +173,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase | |||
173 | $res = $readabilityImport->setMarkAsRead(true)->import(); | 173 | $res = $readabilityImport->setMarkAsRead(true)->import(); |
174 | 174 | ||
175 | $this->assertTrue($res); | 175 | $this->assertTrue($res); |
176 | $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $readabilityImport->getSummary()); | 176 | $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 23], $readabilityImport->getSummary()); |
177 | } | 177 | } |
178 | 178 | ||
179 | public function testImportWithRedis() | 179 | public function testImportWithRedis() |
@@ -211,7 +211,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase | |||
211 | $res = $readabilityImport->setMarkAsRead(true)->import(); | 211 | $res = $readabilityImport->setMarkAsRead(true)->import(); |
212 | 212 | ||
213 | $this->assertTrue($res); | 213 | $this->assertTrue($res); |
214 | $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $readabilityImport->getSummary()); | 214 | $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 23], $readabilityImport->getSummary()); |
215 | 215 | ||
216 | $this->assertNotEmpty($redisMock->lpop('readability')); | 216 | $this->assertNotEmpty($redisMock->lpop('readability')); |
217 | } | 217 | } |