aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php10
-rw-r--r--tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php8
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php8
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php12
4 files changed, 19 insertions, 19 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
index 425fa321..a3f68892 100644
--- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
@@ -270,7 +270,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
270 $res = $pocketImport->import(); 270 $res = $pocketImport->import();
271 271
272 $this->assertTrue($res); 272 $this->assertTrue($res);
273 $this->assertEquals(['skipped' => 1, 'imported' => 1], $pocketImport->getSummary()); 273 $this->assertEquals(['skipped' => 1, 'imported' => 1, 'queued' => 0], $pocketImport->getSummary());
274 } 274 }
275 275
276 /** 276 /**
@@ -365,7 +365,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
365 $res = $pocketImport->setMarkAsRead(true)->import(); 365 $res = $pocketImport->setMarkAsRead(true)->import();
366 366
367 $this->assertTrue($res); 367 $this->assertTrue($res);
368 $this->assertEquals(['skipped' => 0, 'imported' => 2], $pocketImport->getSummary()); 368 $this->assertEquals(['skipped' => 0, 'imported' => 2, 'queued' => 0], $pocketImport->getSummary());
369 } 369 }
370 370
371 /** 371 /**
@@ -451,7 +451,7 @@ JSON;
451 $res = $pocketImport->setMarkAsRead(true)->import(); 451 $res = $pocketImport->setMarkAsRead(true)->import();
452 452
453 $this->assertTrue($res); 453 $this->assertTrue($res);
454 $this->assertEquals(['skipped' => 0, 'imported' => 1], $pocketImport->getSummary()); 454 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 1], $pocketImport->getSummary());
455 } 455 }
456 456
457 /** 457 /**
@@ -530,7 +530,7 @@ JSON;
530 $res = $pocketImport->setMarkAsRead(true)->import(); 530 $res = $pocketImport->setMarkAsRead(true)->import();
531 531
532 $this->assertTrue($res); 532 $this->assertTrue($res);
533 $this->assertEquals(['skipped' => 0, 'imported' => 1], $pocketImport->getSummary()); 533 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 1], $pocketImport->getSummary());
534 534
535 $this->assertNotEmpty($redisMock->lpop('pocket')); 535 $this->assertNotEmpty($redisMock->lpop('pocket'));
536 } 536 }
@@ -607,6 +607,6 @@ JSON;
607 $res = $pocketImport->import(); 607 $res = $pocketImport->import();
608 608
609 $this->assertTrue($res); 609 $this->assertTrue($res);
610 $this->assertEquals(['skipped' => 1, 'imported' => 0], $pocketImport->getSummary()); 610 $this->assertEquals(['skipped' => 1, 'imported' => 0, 'queued' => 0], $pocketImport->getSummary());
611 } 611 }
612} 612}
diff --git a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
index 67917154..d98cd486 100644
--- a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
@@ -82,7 +82,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase
82 $res = $readabilityImport->import(); 82 $res = $readabilityImport->import();
83 83
84 $this->assertTrue($res); 84 $this->assertTrue($res);
85 $this->assertEquals(['skipped' => 0, 'imported' => 24], $readabilityImport->getSummary()); 85 $this->assertEquals(['skipped' => 0, 'imported' => 24, 'queued' => 0], $readabilityImport->getSummary());
86 } 86 }
87 87
88 public function testImportAndMarkAllAsRead() 88 public function testImportAndMarkAllAsRead()
@@ -120,7 +120,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase
120 120
121 $this->assertTrue($res); 121 $this->assertTrue($res);
122 122
123 $this->assertEquals(['skipped' => 1, 'imported' => 1], $readabilityImport->getSummary()); 123 $this->assertEquals(['skipped' => 1, 'imported' => 1, 'queued' => 0], $readabilityImport->getSummary());
124 } 124 }
125 125
126 public function testImportWithRabbit() 126 public function testImportWithRabbit()
@@ -160,7 +160,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase
160 $res = $readabilityImport->setMarkAsRead(true)->import(); 160 $res = $readabilityImport->setMarkAsRead(true)->import();
161 161
162 $this->assertTrue($res); 162 $this->assertTrue($res);
163 $this->assertEquals(['skipped' => 0, 'imported' => 24], $readabilityImport->getSummary()); 163 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $readabilityImport->getSummary());
164 } 164 }
165 165
166 public function testImportWithRedis() 166 public function testImportWithRedis()
@@ -198,7 +198,7 @@ class ReadabilityImportTest extends \PHPUnit_Framework_TestCase
198 $res = $readabilityImport->setMarkAsRead(true)->import(); 198 $res = $readabilityImport->setMarkAsRead(true)->import();
199 199
200 $this->assertTrue($res); 200 $this->assertTrue($res);
201 $this->assertEquals(['skipped' => 0, 'imported' => 24], $readabilityImport->getSummary()); 201 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $readabilityImport->getSummary());
202 202
203 $this->assertNotEmpty($redisMock->lpop('readability')); 203 $this->assertNotEmpty($redisMock->lpop('readability'));
204 } 204 }
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
index b43682cd..5ab4ad00 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
@@ -82,7 +82,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
82 $res = $wallabagV1Import->import(); 82 $res = $wallabagV1Import->import();
83 83
84 $this->assertTrue($res); 84 $this->assertTrue($res);
85 $this->assertEquals(['skipped' => 1, 'imported' => 3], $wallabagV1Import->getSummary()); 85 $this->assertEquals(['skipped' => 1, 'imported' => 3, 'queued' => 0], $wallabagV1Import->getSummary());
86 } 86 }
87 87
88 public function testImportAndMarkAllAsRead() 88 public function testImportAndMarkAllAsRead()
@@ -120,7 +120,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
120 120
121 $this->assertTrue($res); 121 $this->assertTrue($res);
122 122
123 $this->assertEquals(['skipped' => 0, 'imported' => 3], $wallabagV1Import->getSummary()); 123 $this->assertEquals(['skipped' => 0, 'imported' => 3, 'queued' => 0], $wallabagV1Import->getSummary());
124 } 124 }
125 125
126 public function testImportWithRabbit() 126 public function testImportWithRabbit()
@@ -160,7 +160,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
160 $res = $wallabagV1Import->setMarkAsRead(true)->import(); 160 $res = $wallabagV1Import->setMarkAsRead(true)->import();
161 161
162 $this->assertTrue($res); 162 $this->assertTrue($res);
163 $this->assertEquals(['skipped' => 0, 'imported' => 4], $wallabagV1Import->getSummary()); 163 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 4], $wallabagV1Import->getSummary());
164 } 164 }
165 165
166 public function testImportWithRedis() 166 public function testImportWithRedis()
@@ -198,7 +198,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
198 $res = $wallabagV1Import->setMarkAsRead(true)->import(); 198 $res = $wallabagV1Import->setMarkAsRead(true)->import();
199 199
200 $this->assertTrue($res); 200 $this->assertTrue($res);
201 $this->assertEquals(['skipped' => 0, 'imported' => 4], $wallabagV1Import->getSummary()); 201 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 4], $wallabagV1Import->getSummary());
202 202
203 $this->assertNotEmpty($redisMock->lpop('wallabag_v1')); 203 $this->assertNotEmpty($redisMock->lpop('wallabag_v1'));
204 } 204 }
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
index 18998b35..b4017f72 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
@@ -78,7 +78,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
78 $res = $wallabagV2Import->import(); 78 $res = $wallabagV2Import->import();
79 79
80 $this->assertTrue($res); 80 $this->assertTrue($res);
81 $this->assertEquals(['skipped' => 22, 'imported' => 2], $wallabagV2Import->getSummary()); 81 $this->assertEquals(['skipped' => 22, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
82 } 82 }
83 83
84 public function testImportAndMarkAllAsRead() 84 public function testImportAndMarkAllAsRead()
@@ -116,7 +116,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
116 116
117 $this->assertTrue($res); 117 $this->assertTrue($res);
118 118
119 $this->assertEquals(['skipped' => 0, 'imported' => 2], $wallabagV2Import->getSummary()); 119 $this->assertEquals(['skipped' => 0, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
120 } 120 }
121 121
122 public function testImportWithRabbit() 122 public function testImportWithRabbit()
@@ -152,7 +152,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
152 $res = $wallabagV2Import->setMarkAsRead(true)->import(); 152 $res = $wallabagV2Import->setMarkAsRead(true)->import();
153 153
154 $this->assertTrue($res); 154 $this->assertTrue($res);
155 $this->assertEquals(['skipped' => 0, 'imported' => 24], $wallabagV2Import->getSummary()); 155 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $wallabagV2Import->getSummary());
156 } 156 }
157 157
158 public function testImportWithRedis() 158 public function testImportWithRedis()
@@ -186,7 +186,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
186 $res = $wallabagV2Import->setMarkAsRead(true)->import(); 186 $res = $wallabagV2Import->setMarkAsRead(true)->import();
187 187
188 $this->assertTrue($res); 188 $this->assertTrue($res);
189 $this->assertEquals(['skipped' => 0, 'imported' => 24], $wallabagV2Import->getSummary()); 189 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $wallabagV2Import->getSummary());
190 190
191 $this->assertNotEmpty($redisMock->lpop('wallabag_v2')); 191 $this->assertNotEmpty($redisMock->lpop('wallabag_v2'));
192 } 192 }
@@ -227,7 +227,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
227 $res = $wallabagV2Import->import(); 227 $res = $wallabagV2Import->import();
228 228
229 $this->assertFalse($res); 229 $this->assertFalse($res);
230 $this->assertEquals(['skipped' => 0, 'imported' => 0], $wallabagV2Import->getSummary()); 230 $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 0], $wallabagV2Import->getSummary());
231 } 231 }
232 232
233 public function testImportWithExceptionFromGraby() 233 public function testImportWithExceptionFromGraby()
@@ -256,6 +256,6 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
256 $res = $wallabagV2Import->import(); 256 $res = $wallabagV2Import->import();
257 257
258 $this->assertTrue($res); 258 $this->assertTrue($res);
259 $this->assertEquals(['skipped' => 24, 'imported' => 0], $wallabagV2Import->getSummary()); 259 $this->assertEquals(['skipped' => 24, 'imported' => 0, 'queued' => 0], $wallabagV2Import->getSummary());
260 } 260 }
261} 261}