aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-17 07:40:56 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-17 07:40:56 +0200
commit59b97fae996d8307b9d957d210d46200f6d206bf (patch)
tree9481859d10fafed91067ac7736480e91cd6eb4bb /tests/Wallabag/ImportBundle/Import/PocketImportTest.php
parentfbb319f064e6336a3b44bda12cdc51c93c51f379 (diff)
downloadwallabag-59b97fae996d8307b9d957d210d46200f6d206bf.tar.gz
wallabag-59b97fae996d8307b9d957d210d46200f6d206bf.tar.zst
wallabag-59b97fae996d8307b9d957d210d46200f6d206bf.zip
Avoid losing entry when fetching fail
Instead of just say “Failed to save entry” we’ll save the entry at all cost and try to fetch content. If fetching content failed, the entry will still be saved at least, but without content.
Diffstat (limited to 'tests/Wallabag/ImportBundle/Import/PocketImportTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
index 48fbbfb6..952521a2 100644
--- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
@@ -566,6 +566,8 @@ JSON;
566 "status": 1, 566 "status": 1,
567 "list": { 567 "list": {
568 "229279689": { 568 "229279689": {
569 "status": "1",
570 "favorite": "1",
569 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview" 571 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
570 } 572 }
571 } 573 }
@@ -603,6 +605,6 @@ JSON;
603 $res = $pocketImport->import(); 605 $res = $pocketImport->import();
604 606
605 $this->assertTrue($res); 607 $this->assertTrue($res);
606 $this->assertEquals(['skipped' => 1, 'imported' => 0, 'queued' => 0], $pocketImport->getSummary()); 608 $this->assertEquals(['skipped' => 0, 'imported' => 1, 'queued' => 0], $pocketImport->getSummary());
607 } 609 }
608} 610}