forked from wallabag/wallabag
Add controller test for Instapaper
This commit is contained in:
committed by
Nicolas Lœuillet
parent
ff1a5362f7
commit
c7ea9b41f3
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user