aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-06 06:34:57 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-07 21:00:04 +0100
commitb88cf91fc8371194df78e690983c61ea94f266cd (patch)
treeea9d934eb7a593de8cd69ea28e014a44702b23c7 /src/Wallabag/ImportBundle/Import/WallabagV1Import.php
parentd1af8ad4dbf7f3ce5170655c2fa8403406283039 (diff)
downloadwallabag-b88cf91fc8371194df78e690983c61ea94f266cd.tar.gz
wallabag-b88cf91fc8371194df78e690983c61ea94f266cd.tar.zst
wallabag-b88cf91fc8371194df78e690983c61ea94f266cd.zip
updated tests
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV1Import.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV1Import.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
index 68f0574f..393089d6 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
@@ -5,7 +5,6 @@ namespace Wallabag\ImportBundle\Import;
5use Psr\Log\LoggerInterface; 5use Psr\Log\LoggerInterface;
6use Psr\Log\NullLogger; 6use Psr\Log\NullLogger;
7use Doctrine\ORM\EntityManager; 7use Doctrine\ORM\EntityManager;
8use Symfony\Component\Translation\TranslatorInterface;
9use Wallabag\CoreBundle\Entity\Entry; 8use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\UserBundle\Entity\User; 9use Wallabag\UserBundle\Entity\User;
11use Wallabag\CoreBundle\Tools\Utils; 10use Wallabag\CoreBundle\Tools\Utils;
@@ -18,13 +17,11 @@ class WallabagV1Import implements ImportInterface
18 private $skippedEntries = 0; 17 private $skippedEntries = 0;
19 private $importedEntries = 0; 18 private $importedEntries = 0;
20 private $filepath; 19 private $filepath;
21 private $translator;
22 20
23 public function __construct(EntityManager $em, TranslatorInterface $translator) 21 public function __construct(EntityManager $em)
24 { 22 {
25 $this->em = $em; 23 $this->em = $em;
26 $this->logger = new NullLogger(); 24 $this->logger = new NullLogger();
27 $this->translator = $translator;
28 } 25 }
29 26
30 public function setLogger(LoggerInterface $logger) 27 public function setLogger(LoggerInterface $logger)
@@ -66,7 +63,7 @@ class WallabagV1Import implements ImportInterface
66 */ 63 */
67 public function getDescription() 64 public function getDescription()
68 { 65 {
69 return $this->translator->trans('This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.'); 66 return 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.';
70 } 67 }
71 68
72 /** 69 /**