1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

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

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