Move Import controllers to Core

This commit is contained in:
Yassine Guedidi
2023-12-31 12:25:57 +01:00
parent ed4b20f27f
commit 6787f598cb
60 changed files with 178 additions and 187 deletions

View File

@ -40,7 +40,7 @@ class WallabagV2ImportTest extends TestCase
public function testImport()
{
$wallabagV2Import = $this->getWallabagV2Import(false, 2);
$wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json');
$wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2-read.json');
$wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2.json');
$wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2.json');
$wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2.jsonx');
$wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2.json');
$wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2-empty.json');
$wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/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__ . '/../fixtures/wallabag-v2.json');
$wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor()