From 64b1229b2d711e6b2f0e60de482802d9e86b912f Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 21 Sep 2016 19:24:19 +0200 Subject: fix tests --- src/Wallabag/ImportBundle/Import/BrowserImport.php | 4 +-- src/Wallabag/ImportBundle/Import/ChromeImport.php | 40 +++++++++++----------- .../ImportBundle/Resources/config/redis.yml | 4 +-- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php index 3e1cb12b..198e148e 100644 --- a/src/Wallabag/ImportBundle/Import/BrowserImport.php +++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php @@ -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; } diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php index 941d68d3..1af7cc87 100644 --- a/src/Wallabag/ImportBundle/Import/ChromeImport.php +++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php @@ -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'], - ]; - - if (array_key_exists('tags', $entry) && $entry['tags'] != '') { - $data['tags'] = $entry['tags']; - } - - return $data; - } + /** + * {@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']; + } + + return $data; + } /** * {@inheritdoc} diff --git a/src/Wallabag/ImportBundle/Resources/config/redis.yml b/src/Wallabag/ImportBundle/Resources/config/redis.yml index c47778b8..c9c2cf26 100644 --- a/src/Wallabag/ImportBundle/Resources/config/redis.yml +++ b/src/Wallabag/ImportBundle/Resources/config/redis.yml @@ -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" -- cgit v1.2.3