aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-13 21:09:05 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-13 21:09:05 +0200
commitc80cc01afa315dcfa38b2a01c5b05d4516659c24 (patch)
treeb6c51e22260584b2c340358d384bddf13b8c9418
parente01a3c98d6908e95121b5ade0161f40af1b05ca6 (diff)
downloadwallabag-c80cc01afa315dcfa38b2a01c5b05d4516659c24.tar.gz
wallabag-c80cc01afa315dcfa38b2a01c5b05d4516659c24.tar.zst
wallabag-c80cc01afa315dcfa38b2a01c5b05d4516659c24.zip
Change flash message for queued articles
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml1
-rw-r--r--src/Wallabag/ImportBundle/Controller/PocketController.php6
-rw-r--r--src/Wallabag/ImportBundle/Controller/ReadabilityController.php6
-rw-r--r--src/Wallabag/ImportBundle/Controller/WallabagController.php6
-rw-r--r--src/Wallabag/ImportBundle/Import/AbstractImport.php15
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php11
-rw-r--r--src/Wallabag/ImportBundle/Import/ReadabilityImport.php11
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php11
-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
22 files changed, 65 insertions, 56 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index 3dad0b8f..4e5ed9ae 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -430,6 +430,7 @@ flashes:
430 # failed: 'Import failed, please try again.' 430 # failed: 'Import failed, please try again.'
431 # failed_on_file: 'Error while processing import. Please verify your import file.' 431 # failed_on_file: 'Error while processing import. Please verify your import file.'
432 # summary: 'Import summary: %imported% imported, %skipped% already saved.' 432 # summary: 'Import summary: %imported% imported, %skipped% already saved.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 # client_created: 'New client created.' 436 # client_created: 'New client created.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index c0a674e3..107187bf 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -430,6 +430,7 @@ flashes:
430 failed: 'Import fehlgeschlagen, bitte erneut probieren.' 430 failed: 'Import fehlgeschlagen, bitte erneut probieren.'
431 failed_on_file: 'Fehler während des Imports. Bitte überprüfe deine Import-Datei.' 431 failed_on_file: 'Fehler während des Imports. Bitte überprüfe deine Import-Datei.'
432 summary: 'Import-Zusammenfassung: %imported% importiert, %skipped% bereits gespeichert.' 432 summary: 'Import-Zusammenfassung: %imported% importiert, %skipped% bereits gespeichert.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 client_created: 'Neuer Client erstellt.' 436 client_created: 'Neuer Client erstellt.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index 4104f4d4..ac60295f 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -432,6 +432,7 @@ flashes:
432 failed: 'Import failed, please try again.' 432 failed: 'Import failed, please try again.'
433 failed_on_file: 'Error while processing import. Please verify your import file.' 433 failed_on_file: 'Error while processing import. Please verify your import file.'
434 summary: 'Import summary: %imported% imported, %skipped% already saved.' 434 summary: 'Import summary: %imported% imported, %skipped% already saved.'
435 summary_with_queue: 'Import summary: %queued% queued.'
435 developer: 436 developer:
436 notice: 437 notice:
437 client_created: 'New client %name% created.' 438 client_created: 'New client %name% created.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index e5604fda..1082e6de 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -427,9 +427,10 @@ flashes:
427 tag_added: 'Etiqueta añadida' 427 tag_added: 'Etiqueta añadida'
428 import: 428 import:
429 notice: 429 notice:
430 failed: 'Importación reprobada, por favor inténtelo de nuevo.' 430 failed: 'Importación reprobada, por favor inténtelo de nuevo.'
431 failed_on_file: 'Se ocurre un error por procesar importación. Por favor verifique su archivo importado.' 431 failed_on_file: 'Se ocurre un error por procesar importación. Por favor verifique su archivo importado.'
432 summary: 'Resúmen importado: %importado% importado, %saltados% ya guardado.' 432 summary: 'Resúmen importado: %importado% importado, %saltados% ya guardado.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 client_created: 'Nuevo cliente creado.' 436 client_created: 'Nuevo cliente creado.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 63464d94..78317a9c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -430,6 +430,7 @@ flashes:
430 failed: 'درون‌ریزی شکست خورد. لطفاً دوباره تلاش کنید.' 430 failed: 'درون‌ریزی شکست خورد. لطفاً دوباره تلاش کنید.'
431 failed_on_file: 'خطا هنگام پردازش پروندهٔ ورودی. آیا پروندهٔ درون‌ریزی شده سالم است؟' 431 failed_on_file: 'خطا هنگام پردازش پروندهٔ ورودی. آیا پروندهٔ درون‌ریزی شده سالم است؟'
432 summary: 'گزارش درون‌ریزی: %imported% وارد شد, %skipped% از قبل ذخیره شده بود.' 432 summary: 'گزارش درون‌ریزی: %imported% وارد شد, %skipped% از قبل ذخیره شده بود.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 # client_created: 'New client created.' 436 # client_created: 'New client created.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 3207b7f9..50515d80 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -432,6 +432,7 @@ flashes:
432 failed: "L'import a échoué, veuillez ré-essayer" 432 failed: "L'import a échoué, veuillez ré-essayer"
433 failed_on_file: "Erreur lors du traitement de l'import. Vérifier votre fichier." 433 failed_on_file: "Erreur lors du traitement de l'import. Vérifier votre fichier."
434 summary: "Rapport d'import: %imported% importés, %skipped% déjà présent." 434 summary: "Rapport d'import: %imported% importés, %skipped% déjà présent."
435 summary_with_queue: "Rapport d'import: %queued% en cours de traitement."
435 developer: 436 developer:
436 notice: 437 notice:
437 client_created: 'Nouveau client %name% créé' 438 client_created: 'Nouveau client %name% créé'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 5be376c8..5badeffc 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -429,6 +429,7 @@ flashes:
429 failed: 'Importazione fallita, riprova.' 429 failed: 'Importazione fallita, riprova.'
430 failed_on_file: 'Errore durante la processazione dei dati da importare. Verifica il tuo file di import.' 430 failed_on_file: 'Errore durante la processazione dei dati da importare. Verifica il tuo file di import.'
431 summary: 'Sommario di importazione: %imported% importati, %skipped% già salvati.' 431 summary: 'Sommario di importazione: %imported% importati, %skipped% già salvati.'
432 # summary_with_queue: 'Import summary: %queued% queued.'
432 developer: 433 developer:
433 notice: 434 notice:
434 client_created: 'Nuovo client creato.' 435 client_created: 'Nuovo client creato.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 3778b868..2383886c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -430,6 +430,7 @@ flashes:
430 failed: "L'importacion a fracassat, mercés de tornar ensajar" 430 failed: "L'importacion a fracassat, mercés de tornar ensajar"
431 failed_on_file: "Errorr pendent du tractament de l'import. Mercés de verificar vòstre fichièr." 431 failed_on_file: "Errorr pendent du tractament de l'import. Mercés de verificar vòstre fichièr."
432 summary: "Rapòrt d'import: %imported% importats, %skipped% ja presents." 432 summary: "Rapòrt d'import: %imported% importats, %skipped% ja presents."
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 client_created: 'Novèl client creat' 436 client_created: 'Novèl client creat'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index 8b536679..40cd2b71 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -430,6 +430,7 @@ flashes:
430 failed: 'Nieudany import, prosimy spróbować ponownie.' 430 failed: 'Nieudany import, prosimy spróbować ponownie.'
431 failed_on_file: 'Błąd podczas ptrzetwarzania pliku. Sprawdż swój importowany plik.' 431 failed_on_file: 'Błąd podczas ptrzetwarzania pliku. Sprawdż swój importowany plik.'
432 summary: 'Podsumowanie importu: %imported% zaimportowane, %skipped% już zapisane.' 432 summary: 'Podsumowanie importu: %imported% zaimportowane, %skipped% już zapisane.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 client_created: 'Nowy klient utworzony.' 436 client_created: 'Nowy klient utworzony.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 3f330da4..b18eab9e 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -430,6 +430,7 @@ flashes:
430 # failed: 'Import failed, please try again.' 430 # failed: 'Import failed, please try again.'
431 # failed_on_file: 'Error while processing import. Please verify your import file.' 431 # failed_on_file: 'Error while processing import. Please verify your import file.'
432 # summary: 'Import summary: %imported% imported, %skipped% already saved.' 432 # summary: 'Import summary: %imported% imported, %skipped% already saved.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 # client_created: 'New client created.' 436 # client_created: 'New client created.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 5216ebe5..82fa93af 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -430,6 +430,7 @@ flashes:
430 # failed: 'Import failed, please try again.' 430 # failed: 'Import failed, please try again.'
431 # failed_on_file: 'Error while processing import. Please verify your import file.' 431 # failed_on_file: 'Error while processing import. Please verify your import file.'
432 # summary: 'Import summary: %imported% imported, %skipped% already saved.' 432 # summary: 'Import summary: %imported% imported, %skipped% already saved.'
433 # summary_with_queue: 'Import summary: %queued% queued.'
433 developer: 434 developer:
434 notice: 435 notice:
435 # client_created: 'New client created.' 436 # client_created: 'New client created.'
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php
index 3d555717..1f92c182 100644
--- a/src/Wallabag/ImportBundle/Controller/PocketController.php
+++ b/src/Wallabag/ImportBundle/Controller/PocketController.php
@@ -102,6 +102,12 @@ class PocketController extends Controller
102 '%imported%' => $summary['imported'], 102 '%imported%' => $summary['imported'],
103 '%skipped%' => $summary['skipped'], 103 '%skipped%' => $summary['skipped'],
104 ]); 104 ]);
105
106 if (0 < $summary['queued']) {
107 $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [
108 '%queued%' => $summary['queued'],
109 ]);
110 }
105 } 111 }
106 112
107 $this->get('session')->getFlashBag()->add( 113 $this->get('session')->getFlashBag()->add(
diff --git a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php
index 8775e8a3..d00e22c2 100644
--- a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php
+++ b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php
@@ -46,6 +46,12 @@ class ReadabilityController extends Controller
46 '%skipped%' => $summary['skipped'], 46 '%skipped%' => $summary['skipped'],
47 ]); 47 ]);
48 48
49 if (0 < $summary['queued']) {
50 $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [
51 '%queued%' => $summary['queued'],
52 ]);
53 }
54
49 unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); 55 unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name);
50 } 56 }
51 57
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagController.php b/src/Wallabag/ImportBundle/Controller/WallabagController.php
index 3c2dd6d1..9c0cde80 100644
--- a/src/Wallabag/ImportBundle/Controller/WallabagController.php
+++ b/src/Wallabag/ImportBundle/Controller/WallabagController.php
@@ -60,6 +60,12 @@ abstract class WallabagController extends Controller
60 '%skipped%' => $summary['skipped'], 60 '%skipped%' => $summary['skipped'],
61 ]); 61 ]);
62 62
63 if (0 < $summary['queued']) {
64 $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [
65 '%queued%' => $summary['queued'],
66 ]);
67 }
68
63 unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); 69 unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name);
64 } 70 }
65 71
diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php
index 4cd8e846..2af0e69b 100644
--- a/src/Wallabag/ImportBundle/Import/AbstractImport.php
+++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php
@@ -21,6 +21,7 @@ abstract class AbstractImport implements ImportInterface
21 protected $markAsRead; 21 protected $markAsRead;
22 protected $skippedEntries = 0; 22 protected $skippedEntries = 0;
23 protected $importedEntries = 0; 23 protected $importedEntries = 0;
24 protected $queuedEntries = 0;
24 25
25 public function __construct(EntityManager $em, ContentProxy $contentProxy) 26 public function __construct(EntityManager $em, ContentProxy $contentProxy)
26 { 27 {
@@ -145,13 +146,25 @@ abstract class AbstractImport implements ImportInterface
145 $importedEntry = $this->setEntryAsRead($importedEntry); 146 $importedEntry = $this->setEntryAsRead($importedEntry);
146 } 147 }
147 148
148 ++$this->importedEntries; 149 ++$this->queuedEntries;
149 150
150 $this->producer->publish(json_encode($importedEntry)); 151 $this->producer->publish(json_encode($importedEntry));
151 } 152 }
152 } 153 }
153 154
154 /** 155 /**
156 * {@inheritdoc}
157 */
158 public function getSummary()
159 {
160 return [
161 'skipped' => $this->skippedEntries,
162 'imported' => $this->importedEntries,
163 'queued' => $this->queuedEntries,
164 ];
165 }
166
167 /**
155 * Parse one entry. 168 * Parse one entry.
156 * 169 *
157 * @param array $importedEntry 170 * @param array $importedEntry
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index fe39d33f..cc6faf1f 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -173,17 +173,6 @@ class PocketImport extends AbstractImport
173 } 173 }
174 174
175 /** 175 /**
176 * {@inheritdoc}
177 */
178 public function getSummary()
179 {
180 return [
181 'skipped' => $this->skippedEntries,
182 'imported' => $this->importedEntries,
183 ];
184 }
185
186 /**
187 * Set the Guzzle client. 176 * Set the Guzzle client.
188 * 177 *
189 * @param Client $client 178 * @param Client $client
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
index 8f080d38..b852f8f0 100644
--- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
+++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
@@ -47,17 +47,6 @@ class ReadabilityImport extends AbstractImport
47 /** 47 /**
48 * {@inheritdoc} 48 * {@inheritdoc}
49 */ 49 */
50 public function getSummary()
51 {
52 return [
53 'skipped' => $this->skippedEntries,
54 'imported' => $this->importedEntries,
55 ];
56 }
57
58 /**
59 * {@inheritdoc}
60 */
61 public function import() 50 public function import()
62 { 51 {
63 if (!$this->user) { 52 if (!$this->user) {
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index 8e50b135..969a6a04 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -73,17 +73,6 @@ abstract class WallabagImport extends AbstractImport
73 } 73 }
74 74
75 /** 75 /**
76 * {@inheritdoc}
77 */
78 public function getSummary()
79 {
80 return [
81 'skipped' => $this->skippedEntries,
82 'imported' => $this->importedEntries,
83 ];
84 }
85
86 /**
87 * Set file path to the json file. 76 * Set file path to the json file.
88 * 77 *
89 * @param string $filepath 78 * @param string $filepath
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}