forked from wallabag/wallabag
Fix tests
This commit is contained in:
@ -20,6 +20,7 @@ class ImportCommand extends ContainerAwareCommand
|
||||
->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file')
|
||||
->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1, v2, instapaper, pinboard, readability, firefox or chrome', 'v1')
|
||||
->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false)
|
||||
->addOption('useUserId', null, InputArgument::OPTIONAL, 'Use user id instead of username to find account', false)
|
||||
->addOption('disableContentUpdate', null, InputOption::VALUE_NONE, 'Disable fetching updated content from URL')
|
||||
;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ abstract class AbstractImport implements ImportInterface
|
||||
protected $producer;
|
||||
protected $user;
|
||||
protected $markAsRead;
|
||||
protected $disableContentUpdate;
|
||||
protected $disableContentUpdate = false;
|
||||
protected $skippedEntries = 0;
|
||||
protected $importedEntries = 0;
|
||||
protected $queuedEntries = 0;
|
||||
@ -115,6 +115,9 @@ abstract class AbstractImport implements ImportInterface
|
||||
*/
|
||||
protected function fetchContent(Entry $entry, $url, array $content = [])
|
||||
{
|
||||
// be sure to set at least the given url
|
||||
$content['url'] = isset($content['url']) ? $content['url'] : $url;
|
||||
|
||||
try {
|
||||
$this->contentProxy->importEntry($entry, $content, $this->disableContentUpdate);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@ -7,12 +7,12 @@ class WallabagV1Import extends WallabagImport
|
||||
protected $fetchingErrorMessage;
|
||||
protected $fetchingErrorMessageTitle;
|
||||
|
||||
public function __construct($em, $contentProxy, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage)
|
||||
public function __construct($em, $contentProxy, $tagsAssigner, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage)
|
||||
{
|
||||
$this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle;
|
||||
$this->fetchingErrorMessage = $fetchingErrorMessage;
|
||||
|
||||
parent::__construct($em, $contentProxy, $eventDispatcher);
|
||||
parent::__construct($em, $contentProxy, $tagsAssigner, $eventDispatcher);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user