Move Import importers to Core

This commit is contained in:
Yassine Guedidi 2023-12-31 18:21:09 +01:00
parent 6787f598cb
commit 47b3a08284
56 changed files with 167 additions and 167 deletions

View file

@ -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 }

View file

@ -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'

View file

@ -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'

View file

@ -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

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
{

View file

@ -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
{

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManagerInterface;
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Event\EntrySavedEvent;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class ChromeImport extends BrowserImport
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class ElcuratorImport extends WallabagImport
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class FirefoxImport extends BrowserImport
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Event\EntrySavedEvent;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class ImportChain
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Psr\Log\LoggerAwareInterface;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class PocketHtmlImport extends HtmlImport
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Http\Client\Common\HttpMethodsClient;
use Http\Client\Common\Plugin\ErrorPlugin;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class ShaarliImport extends HtmlImport
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Import;
namespace Wallabag\CoreBundle\Import;
class WallabagV2Import extends WallabagImport
{

View file

@ -4,7 +4,7 @@ namespace Wallabag\ImportBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Wallabag\ImportBundle\Import\ImportCompilerPass;
use Wallabag\CoreBundle\Import\ImportCompilerPass;
class WallabagImportBundle extends Bundle
{

View file

@ -9,8 +9,8 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Consumer\AMQPEntryConsumer;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Import\AbstractImport;
use Wallabag\CoreBundle\Repository\UserRepository;
use Wallabag\ImportBundle\Import\AbstractImport;
class AMQPEntryConsumerTest extends TestCase
{

View file

@ -8,8 +8,8 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Consumer\RedisEntryConsumer;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Import\AbstractImport;
use Wallabag\CoreBundle\Repository\UserRepository;
use Wallabag\ImportBundle\Import\AbstractImport;
class RedisEntryConsumerTest extends TestCase
{

View file

@ -5,7 +5,7 @@ namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\ImportBundle\Import\PocketImport;
use Wallabag\CoreBundle\Import\PocketImport;
class PocketControllerTest extends WallabagCoreTestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use M6Web\Component\RedisMock\RedisMockFactory;
@ -14,8 +14,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\ChromeImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\ChromeImport;
use Wallabag\ImportBundle\Redis\Producer;
class ChromeImportTest extends TestCase
@ -38,7 +38,7 @@ class ChromeImportTest extends TestCase
public function testImport()
{
$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()
@ -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();

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use M6Web\Component\RedisMock\RedisMockFactory;
@ -14,8 +14,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\FirefoxImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\FirefoxImport;
use Wallabag\ImportBundle\Redis\Producer;
class FirefoxImportTest extends TestCase
@ -38,7 +38,7 @@ class FirefoxImportTest extends TestCase
public function testImport()
{
$firefoxImport = $this->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();

View file

@ -1,10 +1,10 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use PHPUnit\Framework\TestCase;
use Wallabag\ImportBundle\Import\ImportChain;
use Wallabag\ImportBundle\Import\ImportInterface;
use Wallabag\CoreBundle\Import\ImportChain;
use Wallabag\CoreBundle\Import\ImportInterface;
class ImportChainTest extends TestCase
{

View file

@ -1,11 +1,11 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Wallabag\ImportBundle\Import\ImportChain;
use Wallabag\ImportBundle\Import\ImportCompilerPass;
use Wallabag\CoreBundle\Import\ImportChain;
use Wallabag\CoreBundle\Import\ImportCompilerPass;
class ImportCompilerPassTest extends TestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\UnitOfWork;
@ -15,8 +15,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\InstapaperImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\InstapaperImport;
use Wallabag\ImportBundle\Redis\Producer;
class InstapaperImportTest extends TestCase
@ -40,7 +40,7 @@ class InstapaperImportTest extends TestCase
public function testImport()
{
$instapaperImport = $this->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();

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use M6Web\Component\RedisMock\RedisMockFactory;
@ -14,8 +14,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\PocketHtmlImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\PocketHtmlImport;
use Wallabag\ImportBundle\Redis\Producer;
class PocketHtmlImportTest extends TestCase
@ -38,7 +38,7 @@ class PocketHtmlImportTest extends TestCase
public function testImport()
{
$pocketHtmlImport = $this->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();

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\UnitOfWork;
@ -18,8 +18,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\PocketImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\PocketImport;
use Wallabag\ImportBundle\Redis\Producer;
class PocketImportTest extends TestCase

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use M6Web\Component\RedisMock\RedisMockFactory;
@ -14,8 +14,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\ReadabilityImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\ReadabilityImport;
use Wallabag\ImportBundle\Redis\Producer;
class ReadabilityImportTest extends TestCase
@ -38,7 +38,7 @@ class ReadabilityImportTest extends TestCase
public function testImport()
{
$readabilityImport = $this->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();

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use M6Web\Component\RedisMock\RedisMockFactory;
@ -14,8 +14,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\ShaarliImport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\ShaarliImport;
use Wallabag\ImportBundle\Redis\Producer;
class ShaarliImportTest extends TestCase
@ -38,7 +38,7 @@ class ShaarliImportTest extends TestCase
public function testImport()
{
$shaarliImport = $this->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();

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\UnitOfWork;
@ -15,8 +15,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\WallabagV1Import;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\WallabagV1Import;
use Wallabag\ImportBundle\Redis\Producer;
class WallabagV1ImportTest extends TestCase
@ -42,7 +42,7 @@ class WallabagV1ImportTest extends TestCase
public function testImport()
{
$wallabagV1Import = $this->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();

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ImportBundle\Import;
namespace Tests\Wallabag\CoreBundle\Import;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\UnitOfWork;
@ -15,8 +15,8 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Import\WallabagV2Import;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\WallabagV2Import;
use Wallabag\ImportBundle\Redis\Producer;
class WallabagV2ImportTest extends TestCase
@ -40,7 +40,7 @@ class WallabagV2ImportTest extends TestCase
public function testImport()
{
$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()
@ -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()