diff --git a/app/config/services.yml b/app/config/services.yml index 6194edee8..142931330 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -329,53 +329,53 @@ services: wallabag_import.pocket.client: alias: 'httplug.client.wallabag_import.pocket.client' - Wallabag\ImportBundle\Import\PocketImport: + Wallabag\CoreBundle\Import\PocketImport: calls: - [ setClient, [ "@wallabag_import.pocket.client" ] ] tags: - { name: wallabag_import.import, alias: pocket } - Wallabag\ImportBundle\Import\WallabagV1Import: + Wallabag\CoreBundle\Import\WallabagV1Import: tags: - { name: wallabag_import.import, alias: wallabag_v1 } - Wallabag\ImportBundle\Import\WallabagV2Import: + Wallabag\CoreBundle\Import\WallabagV2Import: tags: - { name: wallabag_import.import, alias: wallabag_v2 } - Wallabag\ImportBundle\Import\ElcuratorImport: + Wallabag\CoreBundle\Import\ElcuratorImport: tags: - { name: wallabag_import.import, alias: elcurator } - Wallabag\ImportBundle\Import\ReadabilityImport: + Wallabag\CoreBundle\Import\ReadabilityImport: tags: - { name: wallabag_import.import, alias: readability } - Wallabag\ImportBundle\Import\InstapaperImport: + Wallabag\CoreBundle\Import\InstapaperImport: tags: - { name: wallabag_import.import, alias: instapaper } - Wallabag\ImportBundle\Import\PinboardImport: + Wallabag\CoreBundle\Import\PinboardImport: tags: - { name: wallabag_import.import, alias: pinboard } - Wallabag\ImportBundle\Import\DeliciousImport: + Wallabag\CoreBundle\Import\DeliciousImport: tags: - { name: wallabag_import.import, alias: delicious } - Wallabag\ImportBundle\Import\FirefoxImport: + Wallabag\CoreBundle\Import\FirefoxImport: tags: - { name: wallabag_import.import, alias: firefox } - Wallabag\ImportBundle\Import\ChromeImport: + Wallabag\CoreBundle\Import\ChromeImport: tags: - { name: wallabag_import.import, alias: chrome } - Wallabag\ImportBundle\Import\ShaarliImport: + Wallabag\CoreBundle\Import\ShaarliImport: tags: - { name: wallabag_import.import, alias: shaarli } - Wallabag\ImportBundle\Import\PocketHtmlImport: + Wallabag\CoreBundle\Import\PocketHtmlImport: tags: - { name: wallabag_import.import, alias: pocket_html } diff --git a/app/config/services_rabbit.yml b/app/config/services_rabbit.yml index ca59a22cd..b7ab0ccd4 100644 --- a/app/config/services_rabbit.yml +++ b/app/config/services_rabbit.yml @@ -23,59 +23,59 @@ services: wallabag_import.consumer.amqp.pocket: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketImport' + $import: '@Wallabag\CoreBundle\Import\PocketImport' wallabag_import.consumer.amqp.readability: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ReadabilityImport' + $import: '@Wallabag\CoreBundle\Import\ReadabilityImport' wallabag_import.consumer.amqp.instapaper: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\InstapaperImport' + $import: '@Wallabag\CoreBundle\Import\InstapaperImport' wallabag_import.consumer.amqp.pinboard: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PinboardImport' + $import: '@Wallabag\CoreBundle\Import\PinboardImport' wallabag_import.consumer.amqp.delicious: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\DeliciousImport' + $import: '@Wallabag\CoreBundle\Import\DeliciousImport' wallabag_import.consumer.amqp.wallabag_v1: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV1Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV1Import' wallabag_import.consumer.amqp.wallabag_v2: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV2Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV2Import' wallabag_import.consumer.amqp.elcurator: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ElcuratorImport' + $import: '@Wallabag\CoreBundle\Import\ElcuratorImport' wallabag_import.consumer.amqp.firefox: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\FirefoxImport' + $import: '@Wallabag\CoreBundle\Import\FirefoxImport' wallabag_import.consumer.amqp.chrome: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ChromeImport' + $import: '@Wallabag\CoreBundle\Import\ChromeImport' wallabag_import.consumer.amqp.shaarli: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ShaarliImport' + $import: '@Wallabag\CoreBundle\Import\ShaarliImport' wallabag_import.consumer.amqp.pocket_html: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketHtmlImport' + $import: '@Wallabag\CoreBundle\Import\PocketHtmlImport' diff --git a/app/config/services_redis.yml b/app/config/services_redis.yml index 51c5194dd..cee479999 100644 --- a/app/config/services_redis.yml +++ b/app/config/services_redis.yml @@ -19,7 +19,7 @@ services: wallabag_import.consumer.redis.readability: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ReadabilityImport' + $import: '@Wallabag\CoreBundle\Import\ReadabilityImport' # instapaper wallabag_import.queue.redis.instapaper: @@ -35,7 +35,7 @@ services: wallabag_import.consumer.redis.instapaper: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\InstapaperImport' + $import: '@Wallabag\CoreBundle\Import\InstapaperImport' # pinboard wallabag_import.queue.redis.pinboard: @@ -51,7 +51,7 @@ services: wallabag_import.consumer.redis.pinboard: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PinboardImport' + $import: '@Wallabag\CoreBundle\Import\PinboardImport' # delicious wallabag_import.queue.redis.delicious: @@ -67,7 +67,7 @@ services: wallabag_import.consumer.redis.delicious: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\DeliciousImport' + $import: '@Wallabag\CoreBundle\Import\DeliciousImport' # pocket wallabag_import.queue.redis.pocket: @@ -83,7 +83,7 @@ services: wallabag_import.consumer.redis.pocket: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketImport' + $import: '@Wallabag\CoreBundle\Import\PocketImport' # wallabag v1 wallabag_import.queue.redis.wallabag_v1: @@ -99,7 +99,7 @@ services: wallabag_import.consumer.redis.wallabag_v1: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV1Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV1Import' # wallabag v2 wallabag_import.queue.redis.wallabag_v2: @@ -115,7 +115,7 @@ services: wallabag_import.consumer.redis.wallabag_v2: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV2Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV2Import' # elcurator wallabag_import.queue.redis.elcurator: @@ -131,7 +131,7 @@ services: wallabag_import.consumer.redis.elcurator: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ElcuratorImport' + $import: '@Wallabag\CoreBundle\Import\ElcuratorImport' # firefox wallabag_import.queue.redis.firefox: @@ -147,7 +147,7 @@ services: wallabag_import.consumer.redis.firefox: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\FirefoxImport' + $import: '@Wallabag\CoreBundle\Import\FirefoxImport' # chrome wallabag_import.queue.redis.chrome: @@ -163,7 +163,7 @@ services: wallabag_import.consumer.redis.chrome: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ChromeImport' + $import: '@Wallabag\CoreBundle\Import\ChromeImport' # shaarli wallabag_import.queue.redis.shaarli: @@ -179,7 +179,7 @@ services: wallabag_import.consumer.redis.shaarli: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ShaarliImport' + $import: '@Wallabag\CoreBundle\Import\ShaarliImport' # pocket html wallabag_import.queue.redis.pocket_html: @@ -195,4 +195,4 @@ services: wallabag_import.consumer.redis.pocket_html: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketHtmlImport' + $import: '@Wallabag\CoreBundle\Import\PocketHtmlImport' diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index dab2030fe..9ebbc1c5f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -21,32 +21,32 @@ parameters: path: src/Wallabag/CoreBundle/Controller/ConfigController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php diff --git a/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php b/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php index 78cead733..f55c8c97f 100644 --- a/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php +++ b/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php @@ -14,18 +14,18 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Wallabag\CoreBundle\Entity\User; +use Wallabag\CoreBundle\Import\ChromeImport; +use Wallabag\CoreBundle\Import\DeliciousImport; +use Wallabag\CoreBundle\Import\ElcuratorImport; +use Wallabag\CoreBundle\Import\FirefoxImport; +use Wallabag\CoreBundle\Import\InstapaperImport; +use Wallabag\CoreBundle\Import\PinboardImport; +use Wallabag\CoreBundle\Import\PocketHtmlImport; +use Wallabag\CoreBundle\Import\ReadabilityImport; +use Wallabag\CoreBundle\Import\ShaarliImport; +use Wallabag\CoreBundle\Import\WallabagV1Import; +use Wallabag\CoreBundle\Import\WallabagV2Import; use Wallabag\CoreBundle\Repository\UserRepository; -use Wallabag\ImportBundle\Import\ChromeImport; -use Wallabag\ImportBundle\Import\DeliciousImport; -use Wallabag\ImportBundle\Import\ElcuratorImport; -use Wallabag\ImportBundle\Import\FirefoxImport; -use Wallabag\ImportBundle\Import\InstapaperImport; -use Wallabag\ImportBundle\Import\PinboardImport; -use Wallabag\ImportBundle\Import\PocketHtmlImport; -use Wallabag\ImportBundle\Import\ReadabilityImport; -use Wallabag\ImportBundle\Import\ShaarliImport; -use Wallabag\ImportBundle\Import\WallabagV1Import; -use Wallabag\ImportBundle\Import\WallabagV2Import; class ImportCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php b/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php index 242b94a69..cc4134201 100644 --- a/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php +++ b/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php @@ -9,8 +9,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Event\EntrySavedEvent; +use Wallabag\CoreBundle\Import\AbstractImport; use Wallabag\CoreBundle\Repository\UserRepository; -use Wallabag\ImportBundle\Import\AbstractImport; abstract class AbstractConsumer { diff --git a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php index 0288e1243..74b3131f0 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ImportInterface; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ImportInterface; abstract class BrowserController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php index afced108d..6f0ede269 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\ChromeImport; +use Wallabag\CoreBundle\Import\ChromeImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ChromeController extends BrowserController diff --git a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php index 27dc380df..b4ae46ec7 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\DeliciousImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\DeliciousImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class DeliciousController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php index 068a2db2b..033805660 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\ElcuratorImport; +use Wallabag\CoreBundle\Import\ElcuratorImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ElcuratorController extends WallabagController diff --git a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php index 497ff26a6..2d17d5f62 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\FirefoxImport; +use Wallabag\CoreBundle\Import\FirefoxImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class FirefoxController extends BrowserController diff --git a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php index 258ac1dfa..5a0548afe 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ImportInterface; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ImportInterface; abstract class HtmlController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ImportController.php b/src/Wallabag/CoreBundle/Controller/Import/ImportController.php index ff72eddf5..ce60989fb 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ImportController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ImportController.php @@ -8,7 +8,7 @@ use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Wallabag\CoreBundle\Consumer\RabbitMQConsumerTotalProxy; use Wallabag\CoreBundle\Controller\AbstractController; -use Wallabag\ImportBundle\Import\ImportChain; +use Wallabag\CoreBundle\Import\ImportChain; class ImportController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php index 904be04e1..04631e93f 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\InstapaperImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\InstapaperImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class InstapaperController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php index 152db6269..252e7410a 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\PinboardImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\PinboardImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PinboardController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php index abc486ff1..ef510cd4f 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php @@ -11,7 +11,7 @@ use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; -use Wallabag\ImportBundle\Import\PocketImport; +use Wallabag\CoreBundle\Import\PocketImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PocketController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php index af022f5c3..c2de4398b 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\PocketHtmlImport; +use Wallabag\CoreBundle\Import\PocketHtmlImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PocketHtmlController extends HtmlController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php index fa05b07b3..8e26ff315 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ReadabilityImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ReadabilityImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ReadabilityController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php index a93c9db68..eef4e19ec 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\ShaarliImport; +use Wallabag\CoreBundle\Import\ShaarliImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ShaarliController extends HtmlController diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php index db0426e27..440df2005 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ImportInterface; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ImportInterface; /** * Define Wallabag import for v1 and v2, since there are very similar. diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php index 337b58f16..c4a3bacd6 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\WallabagV1Import; +use Wallabag\CoreBundle\Import\WallabagV1Import; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class WallabagV1Controller extends WallabagController diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php index 645cee790..f5ea6e746 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\WallabagV2Import; +use Wallabag\CoreBundle\Import\WallabagV2Import; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class WallabagV2Controller extends WallabagController diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/CoreBundle/Import/AbstractImport.php similarity index 99% rename from src/Wallabag/ImportBundle/Import/AbstractImport.php rename to src/Wallabag/CoreBundle/Import/AbstractImport.php index c9a47562c..203370192 100644 --- a/src/Wallabag/ImportBundle/Import/AbstractImport.php +++ b/src/Wallabag/CoreBundle/Import/AbstractImport.php @@ -1,6 +1,6 @@ getChromeImport(false, 1); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ChromeImportTest extends TestCase public function testImportAndMarkAllAsRead() { $chromeImport = $this->getChromeImport(false, 1); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class ChromeImportTest extends TestCase public function testImportWithRabbit() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ChromeImportTest extends TestCase public function testImportWithRedis() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class ChromeImportTest extends TestCase public function testImportBadFile() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $chromeImport->import(); @@ -203,7 +203,7 @@ class ChromeImportTest extends TestCase public function testImportUserNotDefined() { $chromeImport = $this->getChromeImport(true); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $res = $chromeImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php b/tests/Wallabag/CoreBundle/Import/FirefoxImportTest.php similarity index 91% rename from tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php rename to tests/Wallabag/CoreBundle/Import/FirefoxImportTest.php index cf890287e..5dcdb059a 100644 --- a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/FirefoxImportTest.php @@ -1,6 +1,6 @@ getFirefoxImport(false, 2); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class FirefoxImportTest extends TestCase public function testImportAndMarkAllAsRead() { $firefoxImport = $this->getFirefoxImport(false, 1); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class FirefoxImportTest extends TestCase public function testImportWithRabbit() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class FirefoxImportTest extends TestCase public function testImportWithRedis() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class FirefoxImportTest extends TestCase public function testImportBadFile() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $firefoxImport->import(); @@ -203,7 +203,7 @@ class FirefoxImportTest extends TestCase public function testImportUserNotDefined() { $firefoxImport = $this->getFirefoxImport(true); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $res = $firefoxImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php b/tests/Wallabag/CoreBundle/Import/ImportChainTest.php similarity index 77% rename from tests/Wallabag/ImportBundle/Import/ImportChainTest.php rename to tests/Wallabag/CoreBundle/Import/ImportChainTest.php index c3984fa63..424b84b64 100644 --- a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php +++ b/tests/Wallabag/CoreBundle/Import/ImportChainTest.php @@ -1,10 +1,10 @@ getInstapaperImport(false, 4); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -73,7 +73,7 @@ class InstapaperImportTest extends TestCase public function testImportAndMarkAllAsRead() { $instapaperImport = $this->getInstapaperImport(false, 1); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class InstapaperImportTest extends TestCase public function testImportWithRabbit() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class InstapaperImportTest extends TestCase public function testImportWithRedis() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class InstapaperImportTest extends TestCase public function testImportBadFile() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $instapaperImport->import(); @@ -205,7 +205,7 @@ class InstapaperImportTest extends TestCase public function testImportUserNotDefined() { $instapaperImport = $this->getInstapaperImport(true); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $res = $instapaperImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php b/tests/Wallabag/CoreBundle/Import/PocketHtmlImportTest.php similarity index 91% rename from tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php rename to tests/Wallabag/CoreBundle/Import/PocketHtmlImportTest.php index 21ee84051..af7f27adb 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/PocketHtmlImportTest.php @@ -1,6 +1,6 @@ getPocketHtmlImport(false, 2); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class PocketHtmlImportTest extends TestCase public function testImportAndMarkAllAsRead() { $pocketHtmlImport = $this->getPocketHtmlImport(false, 1); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class PocketHtmlImportTest extends TestCase public function testImportWithRabbit() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class PocketHtmlImportTest extends TestCase public function testImportWithRedis() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class PocketHtmlImportTest extends TestCase public function testImportBadFile() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $pocketHtmlImport->import(); @@ -205,7 +205,7 @@ class PocketHtmlImportTest extends TestCase public function testImportUserNotDefined() { $pocketHtmlImport = $this->getPocketHtmlImport(true); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $res = $pocketHtmlImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/CoreBundle/Import/PocketImportTest.php similarity index 99% rename from tests/Wallabag/ImportBundle/Import/PocketImportTest.php rename to tests/Wallabag/CoreBundle/Import/PocketImportTest.php index 04858f476..04758762b 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/PocketImportTest.php @@ -1,6 +1,6 @@ getReadabilityImport(false, 3); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ReadabilityImportTest extends TestCase public function testImportAndMarkAllAsRead() { $readabilityImport = $this->getReadabilityImport(false, 1); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability-read.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class ReadabilityImportTest extends TestCase public function testImportWithRabbit() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ReadabilityImportTest extends TestCase public function testImportWithRedis() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class ReadabilityImportTest extends TestCase public function testImportBadFile() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $readabilityImport->import(); @@ -203,7 +203,7 @@ class ReadabilityImportTest extends TestCase public function testImportUserNotDefined() { $readabilityImport = $this->getReadabilityImport(true); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $res = $readabilityImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php b/tests/Wallabag/CoreBundle/Import/ShaarliImportTest.php similarity index 91% rename from tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php rename to tests/Wallabag/CoreBundle/Import/ShaarliImportTest.php index b961cea19..a3e9d8887 100644 --- a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/ShaarliImportTest.php @@ -1,6 +1,6 @@ getShaarliImport(false, 2); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ShaarliImportTest extends TestCase public function testImportAndMarkAllAsRead() { $shaarliImport = $this->getShaarliImport(false, 1); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class ShaarliImportTest extends TestCase public function testImportWithRabbit() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class ShaarliImportTest extends TestCase public function testImportWithRedis() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class ShaarliImportTest extends TestCase public function testImportBadFile() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $shaarliImport->import(); @@ -205,7 +205,7 @@ class ShaarliImportTest extends TestCase public function testImportUserNotDefined() { $shaarliImport = $this->getShaarliImport(true); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $res = $shaarliImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/CoreBundle/Import/WallabagV1ImportTest.php similarity index 92% rename from tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php rename to tests/Wallabag/CoreBundle/Import/WallabagV1ImportTest.php index 02e81ba5a..68aa3a88b 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/WallabagV1ImportTest.php @@ -1,6 +1,6 @@ getWallabagV1Import(false, 1); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -75,7 +75,7 @@ class WallabagV1ImportTest extends TestCase public function testImportAndMarkAllAsRead() { $wallabagV1Import = $this->getWallabagV1Import(false, 3); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1-read.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -113,7 +113,7 @@ class WallabagV1ImportTest extends TestCase public function testImportWithRabbit() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -153,7 +153,7 @@ class WallabagV1ImportTest extends TestCase public function testImportWithRedis() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -193,7 +193,7 @@ class WallabagV1ImportTest extends TestCase public function testImportBadFile() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $wallabagV1Import->import(); @@ -207,7 +207,7 @@ class WallabagV1ImportTest extends TestCase public function testImportUserNotDefined() { $wallabagV1Import = $this->getWallabagV1Import(true); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $res = $wallabagV1Import->import(); diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/CoreBundle/Import/WallabagV2ImportTest.php similarity index 90% rename from tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php rename to tests/Wallabag/CoreBundle/Import/WallabagV2ImportTest.php index 589416af0..4f535b2dd 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/WallabagV2ImportTest.php @@ -1,6 +1,6 @@ getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -69,7 +69,7 @@ class WallabagV2ImportTest extends TestCase public function testImportAndMarkAllAsRead() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-read.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -107,7 +107,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithRabbit() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -143,7 +143,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithRedis() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -179,7 +179,7 @@ class WallabagV2ImportTest extends TestCase public function testImportBadFile() { $wallabagV1Import = $this->getWallabagV2Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.jsonx'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.jsonx'); $res = $wallabagV1Import->import(); @@ -193,7 +193,7 @@ class WallabagV2ImportTest extends TestCase public function testImportUserNotDefined() { $wallabagV1Import = $this->getWallabagV2Import(true); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $res = $wallabagV1Import->import(); @@ -207,7 +207,7 @@ class WallabagV2ImportTest extends TestCase public function testImportEmptyFile() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-empty.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2-empty.json'); $res = $wallabagV2Import->import(); @@ -218,7 +218,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithExceptionFromGraby() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor()