1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-17 17:08:37 +00:00

Add controller test for Instapaper

This commit is contained in:
Jeremy Benoist 2016-09-27 17:01:14 +02:00 committed by Nicolas Lœuillet
parent ff1a5362f7
commit c7ea9b41f3
6 changed files with 221 additions and 0 deletions

View file

@ -45,6 +45,8 @@ abstract class BrowserImport extends AbstractImport
$data = json_decode(file_get_contents($this->filepath), true);
if (empty($data)) {
$this->logger->error('Wallabag Browser: no entries in imported file');
return false;
}

View file

@ -80,6 +80,12 @@ class InstapaperImport extends AbstractImport
}
fclose($handle);
if (empty($entries)) {
$this->logger->error('InstapaperImport: no entries in imported file');
return false;
}
if ($this->producer) {
$this->parseEntriesForProducer($entries);

View file

@ -64,6 +64,8 @@ class ReadabilityImport extends AbstractImport
$data = json_decode(file_get_contents($this->filepath), true);
if (empty($data) || empty($data['bookmarks'])) {
$this->logger->error('ReadabilityImport: no entries in imported file');
return false;
}

View file

@ -58,6 +58,8 @@ abstract class WallabagImport extends AbstractImport
$data = json_decode(file_get_contents($this->filepath), true);
if (empty($data)) {
$this->logger->error('WallabagImport: no entries in imported file');
return false;
}