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:
parent
ff1a5362f7
commit
c7ea9b41f3
6 changed files with 221 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue