aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
index efcaeb9e..5cc04aa5 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
@@ -89,7 +89,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
89 ->disableOriginalConstructor() 89 ->disableOriginalConstructor()
90 ->getMock(); 90 ->getMock();
91 91
92 $entryRepo->expects($this->exactly(24)) 92 $entryRepo->expects($this->exactly(6))
93 ->method('findByUrlAndUserId') 93 ->method('findByUrlAndUserId')
94 ->will($this->onConsecutiveCalls(false, true, false)); 94 ->will($this->onConsecutiveCalls(false, true, false));
95 95
@@ -106,7 +106,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
106 $res = $wallabagV2Import->import(); 106 $res = $wallabagV2Import->import();
107 107
108 $this->assertTrue($res); 108 $this->assertTrue($res);
109 $this->assertEquals(['skipped' => 22, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary()); 109 $this->assertEquals(['skipped' => 4, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
110 } 110 }
111 111
112 public function testImportAndMarkAllAsRead() 112 public function testImportAndMarkAllAsRead()
@@ -172,7 +172,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
172 ->getMock(); 172 ->getMock();
173 173
174 $producer 174 $producer
175 ->expects($this->exactly(24)) 175 ->expects($this->exactly(6))
176 ->method('publish'); 176 ->method('publish');
177 177
178 $wallabagV2Import->setProducer($producer); 178 $wallabagV2Import->setProducer($producer);
@@ -180,7 +180,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
180 $res = $wallabagV2Import->setMarkAsRead(true)->import(); 180 $res = $wallabagV2Import->setMarkAsRead(true)->import();
181 181
182 $this->assertTrue($res); 182 $this->assertTrue($res);
183 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $wallabagV2Import->getSummary()); 183 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 6], $wallabagV2Import->getSummary());
184 } 184 }
185 185
186 public function testImportWithRedis() 186 public function testImportWithRedis()
@@ -214,7 +214,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
214 $res = $wallabagV2Import->setMarkAsRead(true)->import(); 214 $res = $wallabagV2Import->setMarkAsRead(true)->import();
215 215
216 $this->assertTrue($res); 216 $this->assertTrue($res);
217 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $wallabagV2Import->getSummary()); 217 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 6], $wallabagV2Import->getSummary());
218 218
219 $this->assertNotEmpty($redisMock->lpop('wallabag_v2')); 219 $this->assertNotEmpty($redisMock->lpop('wallabag_v2'));
220 } 220 }
@@ -267,7 +267,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
267 ->disableOriginalConstructor() 267 ->disableOriginalConstructor()
268 ->getMock(); 268 ->getMock();
269 269
270 $entryRepo->expects($this->exactly(24)) 270 $entryRepo->expects($this->exactly(6))
271 ->method('findByUrlAndUserId') 271 ->method('findByUrlAndUserId')
272 ->will($this->onConsecutiveCalls(false, true, false)); 272 ->will($this->onConsecutiveCalls(false, true, false));
273 273
@@ -284,6 +284,6 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
284 $res = $wallabagV2Import->import(); 284 $res = $wallabagV2Import->import();
285 285
286 $this->assertTrue($res); 286 $this->assertTrue($res);
287 $this->assertEquals(['skipped' => 22, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary()); 287 $this->assertEquals(['skipped' => 4, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
288 } 288 }
289} 289}