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

fix tests

This commit is contained in:
Thomas Citharel 2016-09-21 19:24:19 +02:00 committed by Jeremy Benoist
parent 2c61db30b7
commit 64b1229b2d
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
6 changed files with 49 additions and 50 deletions

View file

@ -31,13 +31,13 @@ abstract class BrowserImport extends AbstractImport
public function import()
{
if (!$this->user) {
$this->logger->error('WallabagImport: user is not defined');
$this->logger->error('Wallabag Browser Import: user is not defined');
return false;
}
if (!file_exists($this->filepath) || !is_readable($this->filepath)) {
$this->logger->error('WallabagImport: unable to read file', ['filepath' => $this->filepath]);
$this->logger->error('Wallabag Browser Import: unable to read file', ['filepath' => $this->filepath]);
return false;
}

View file

@ -30,26 +30,26 @@ class ChromeImport extends BrowserImport
return 'import.chrome.description';
}
/**
* {@inheritdoc}
*/
protected function prepareEntry($entry = [])
{
$data = [
'title' => $entry['name'],
'html' => '',
'url' => $entry['url'],
'is_archived' => $this->markAsRead,
'tags' => '',
'created_at' => $entry['date_added'],
];
/**
* {@inheritdoc}
*/
protected function prepareEntry($entry = [])
{
$data = [
'title' => $entry['name'],
'html' => '',
'url' => $entry['url'],
'is_archived' => $this->markAsRead,
'tags' => '',
'created_at' => $entry['date_added'],
];
if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
$data['tags'] = $entry['tags'];
}
if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
$data['tags'] = $entry['tags'];
}
return $data;
}
return $data;
}
/**
* {@inheritdoc}

View file

@ -107,12 +107,12 @@ services:
- "@wallabag_core.redis.client"
- "wallabag.import.chrome"
wallabag_import.producer.redis.firefox:
wallabag_import.producer.redis.chrome:
class: Wallabag\ImportBundle\Redis\Producer
arguments:
- "@wallabag_import.queue.redis.chrome"
wallabag_import.consumer.redis.firefox:
wallabag_import.consumer.redis.chrome:
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
arguments:
- "@doctrine.orm.entity_manager"