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

@ -1,8 +1,3 @@
wallabag_import:
resource: "@WallabagImportBundle/Controller/"
type: annotation
prefix: /import
app: app:
resource: "@WallabagCoreBundle/Controller/" resource: "@WallabagCoreBundle/Controller/"
type: annotation type: annotation

View file

@ -42,67 +42,63 @@ services:
resource: '../../src/Wallabag/CoreBundle/Controller/' resource: '../../src/Wallabag/CoreBundle/Controller/'
tags: ['controller.service_arguments'] tags: ['controller.service_arguments']
Wallabag\ImportBundle\Controller\:
resource: '../../src/Wallabag/ImportBundle/Controller/'
tags: ['controller.service_arguments']
# inject alias service into controllers # inject alias service into controllers
Wallabag\ImportBundle\Controller\ChromeController: Wallabag\CoreBundle\Controller\Import\ChromeController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_chrome_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_chrome_producer'
$redisProducer: '@wallabag_import.producer.redis.chrome' $redisProducer: '@wallabag_import.producer.redis.chrome'
Wallabag\ImportBundle\Controller\DeliciousController: Wallabag\CoreBundle\Controller\Import\DeliciousController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_delicious_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_delicious_producer'
$redisProducer: '@wallabag_import.producer.redis.delicious' $redisProducer: '@wallabag_import.producer.redis.delicious'
Wallabag\ImportBundle\Controller\ElcuratorController: Wallabag\CoreBundle\Controller\Import\ElcuratorController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_elcurator_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_elcurator_producer'
$redisProducer: '@wallabag_import.producer.redis.elcurator' $redisProducer: '@wallabag_import.producer.redis.elcurator'
Wallabag\ImportBundle\Controller\FirefoxController: Wallabag\CoreBundle\Controller\Import\FirefoxController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_firefox_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_firefox_producer'
$redisProducer: '@wallabag_import.producer.redis.firefox' $redisProducer: '@wallabag_import.producer.redis.firefox'
Wallabag\ImportBundle\Controller\InstapaperController: Wallabag\CoreBundle\Controller\Import\InstapaperController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_instapaper_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_instapaper_producer'
$redisProducer: '@wallabag_import.producer.redis.instapaper' $redisProducer: '@wallabag_import.producer.redis.instapaper'
Wallabag\ImportBundle\Controller\PinboardController: Wallabag\CoreBundle\Controller\Import\PinboardController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_pinboard_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_pinboard_producer'
$redisProducer: '@wallabag_import.producer.redis.pinboard' $redisProducer: '@wallabag_import.producer.redis.pinboard'
Wallabag\ImportBundle\Controller\PocketController: Wallabag\CoreBundle\Controller\Import\PocketController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_producer'
$redisProducer: '@wallabag_import.producer.redis.pocket' $redisProducer: '@wallabag_import.producer.redis.pocket'
Wallabag\ImportBundle\Controller\ReadabilityController: Wallabag\CoreBundle\Controller\Import\ReadabilityController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_readability_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_readability_producer'
$redisProducer: '@wallabag_import.producer.redis.readability' $redisProducer: '@wallabag_import.producer.redis.readability'
Wallabag\ImportBundle\Controller\WallabagV1Controller: Wallabag\CoreBundle\Controller\Import\WallabagV1Controller:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v1_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v1_producer'
$redisProducer: '@wallabag_import.producer.redis.wallabag_v1' $redisProducer: '@wallabag_import.producer.redis.wallabag_v1'
Wallabag\ImportBundle\Controller\WallabagV2Controller: Wallabag\CoreBundle\Controller\Import\WallabagV2Controller:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v2_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v2_producer'
$redisProducer: '@wallabag_import.producer.redis.wallabag_v2' $redisProducer: '@wallabag_import.producer.redis.wallabag_v2'
Wallabag\ImportBundle\Controller\ShaarliController: Wallabag\CoreBundle\Controller\Import\ShaarliController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_shaarli_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_shaarli_producer'
$redisProducer: '@wallabag_import.producer.redis.shaarli' $redisProducer: '@wallabag_import.producer.redis.shaarli'
Wallabag\ImportBundle\Controller\PocketHtmlController: Wallabag\CoreBundle\Controller\Import\PocketHtmlController:
arguments: arguments:
$rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_html_producer' $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_html_producer'
$redisProducer: '@wallabag_import.producer.redis.pocket_html' $redisProducer: '@wallabag_import.producer.redis.pocket_html'

View file

@ -20,6 +20,36 @@ parameters:
count: 6 count: 6
path: src/Wallabag/CoreBundle/Controller/ConfigController.php path: src/Wallabag/CoreBundle/Controller/ConfigController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#"
count: 1
path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#"
count: 1
path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#"
count: 1
path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#"
count: 1
path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#"
count: 1
path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#"
count: 1
path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php
- -
message: "#^Call to an undefined method Spiriit\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpressionBuilder\\(\\)\\.$#" message: "#^Call to an undefined method Spiriit\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpressionBuilder\\(\\)\\.$#"
count: 1 count: 1
@ -40,36 +70,6 @@ parameters:
count: 1 count: 1
path: src/Wallabag/CoreBundle/Mailer/UserMailer.php path: src/Wallabag/CoreBundle/Mailer/UserMailer.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#"
count: 1
path: src/Wallabag/ImportBundle/Controller/BrowserController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#"
count: 1
path: src/Wallabag/ImportBundle/Controller/BrowserController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#"
count: 1
path: src/Wallabag/ImportBundle/Controller/HtmlController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#"
count: 1
path: src/Wallabag/ImportBundle/Controller/HtmlController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#"
count: 1
path: src/Wallabag/ImportBundle/Controller/WallabagController.php
-
message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#"
count: 1
path: src/Wallabag/ImportBundle/Controller/WallabagController.php
- -
message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#"
count: 1 count: 1

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@ -13,7 +13,7 @@ use Wallabag\ImportBundle\Import\ImportInterface;
abstract class BrowserController extends AbstractController abstract class BrowserController extends AbstractController
{ {
/** /**
* @Route("/browser", name="import_browser") * @Route("/import/browser", name="import_browser")
* *
* @return Response * @return Response
*/ */

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class ChromeController extends BrowserController
} }
/** /**
* @Route("/chrome", name="import_chrome") * @Route("/import/chrome", name="import_chrome")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -24,7 +24,7 @@ class DeliciousController extends AbstractController
} }
/** /**
* @Route("/delicious", name="import_delicious") * @Route("/import/delicious", name="import_delicious")
*/ */
public function indexAction(Request $request, DeliciousImport $delicious, Config $craueConfig, TranslatorInterface $translator) public function indexAction(Request $request, DeliciousImport $delicious, Config $craueConfig, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class ElcuratorController extends WallabagController
} }
/** /**
* @Route("/elcurator", name="import_elcurator") * @Route("/import/elcurator", name="import_elcurator")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class FirefoxController extends BrowserController
} }
/** /**
* @Route("/firefox", name="import_firefox") * @Route("/import/firefox", name="import_firefox")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@ -13,7 +13,7 @@ use Wallabag\ImportBundle\Import\ImportInterface;
abstract class HtmlController extends AbstractController abstract class HtmlController extends AbstractController
{ {
/** /**
* @Route("/html", name="import_html") * @Route("/import/html", name="import_html")
* *
* @return Response * @return Response
*/ */

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Predis\Client; use Predis\Client;
@ -20,7 +20,7 @@ class ImportController extends AbstractController
} }
/** /**
* @Route("/", name="import") * @Route("/import/", name="import")
*/ */
public function importAction(ImportChain $importChain) public function importAction(ImportChain $importChain)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -24,7 +24,7 @@ class InstapaperController extends AbstractController
} }
/** /**
* @Route("/instapaper", name="import_instapaper") * @Route("/import/instapaper", name="import_instapaper")
*/ */
public function indexAction(Request $request, InstapaperImport $instapaper, Config $craueConfig, TranslatorInterface $translator) public function indexAction(Request $request, InstapaperImport $instapaper, Config $craueConfig, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -24,7 +24,7 @@ class PinboardController extends AbstractController
} }
/** /**
* @Route("/pinboard", name="import_pinboard") * @Route("/import/pinboard", name="import_pinboard")
*/ */
public function indexAction(Request $request, PinboardImport $pinboard, Config $craueConfig, TranslatorInterface $translator) public function indexAction(Request $request, PinboardImport $pinboard, Config $craueConfig, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -30,7 +30,7 @@ class PocketController extends AbstractController
} }
/** /**
* @Route("/pocket", name="import_pocket") * @Route("/import/pocket", name="import_pocket")
*/ */
public function indexAction(PocketImport $pocketImport) public function indexAction(PocketImport $pocketImport)
{ {
@ -51,7 +51,7 @@ class PocketController extends AbstractController
} }
/** /**
* @Route("/pocket/auth", name="import_pocket_auth") * @Route("/import/pocket/auth", name="import_pocket_auth")
*/ */
public function authAction(Request $request, PocketImport $pocketImport) public function authAction(Request $request, PocketImport $pocketImport)
{ {
@ -81,7 +81,7 @@ class PocketController extends AbstractController
} }
/** /**
* @Route("/pocket/callback", name="import_pocket_callback") * @Route("/import/pocket/callback", name="import_pocket_callback")
*/ */
public function callbackAction(PocketImport $pocketImport, TranslatorInterface $translator) public function callbackAction(PocketImport $pocketImport, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class PocketHtmlController extends HtmlController
} }
/** /**
* @Route("/pocket_html", name="import_pocket_html") * @Route("/import/pocket_html", name="import_pocket_html")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -24,7 +24,7 @@ class ReadabilityController extends AbstractController
} }
/** /**
* @Route("/readability", name="import_readability") * @Route("/import/readability", name="import_readability")
*/ */
public function indexAction(Request $request, ReadabilityImport $readability, Config $craueConfig, TranslatorInterface $translator) public function indexAction(Request $request, ReadabilityImport $readability, Config $craueConfig, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class ShaarliController extends HtmlController
} }
/** /**
* @Route("/shaarli", name="import_shaarli") * @Route("/import/shaarli", name="import_shaarli")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class WallabagV1Controller extends WallabagController
} }
/** /**
* @Route("/wallabag-v1", name="import_wallabag_v1") * @Route("/import/wallabag-v1", name="import_wallabag_v1")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Wallabag\ImportBundle\Controller; namespace Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer;
@ -26,7 +26,7 @@ class WallabagV2Controller extends WallabagController
} }
/** /**
* @Route("/wallabag-v2", name="import_wallabag_v2") * @Route("/import/wallabag-v2", name="import_wallabag_v2")
*/ */
public function indexAction(Request $request, TranslatorInterface $translator) public function indexAction(Request $request, TranslatorInterface $translator)
{ {

View file

@ -3,7 +3,7 @@
{% block title %}{{ 'import.page_title'|trans }}{% endblock %} {% block title %}{{ 'import.page_title'|trans }}{% endblock %}
{% block messages %} {% block messages %}
{{ render(controller('Wallabag\\ImportBundle\\Controller\\ImportController::checkQueueAction')) }} {{ render(controller('Wallabag\\CoreBundle\\Controller\\Import\\ImportController::checkQueueAction')) }}
{{ parent() }} {{ parent() }}
{% endblock %} {% endblock %}

View file

@ -64,7 +64,7 @@ class ImportCommandTest extends WallabagCoreTestCase
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute([ $tester->execute([
'username' => 'admin', 'username' => 'admin',
'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json', 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json',
'--importer' => 'v2', '--importer' => 'v2',
]); ]);
@ -83,7 +83,7 @@ class ImportCommandTest extends WallabagCoreTestCase
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute([ $tester->execute([
'username' => $this->getLoggedInUserId(), 'username' => $this->getLoggedInUserId(),
'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json', 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json',
'--useUserId' => true, '--useUserId' => true,
'--importer' => 'v2', '--importer' => 'v2',
]); ]);

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/chrome-bookmarks', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/chrome-bookmarks', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/chrome'); $crawler = $client->request('GET', '/import/chrome');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/chrome-bookmarks', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/chrome-bookmarks', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -140,7 +140,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/chrome'); $crawler = $client->request('GET', '/import/chrome');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/delicious_export.2021.02.06_21.10.json', 'delicious.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/delicious_export.2021.02.06_21.10.json', 'delicious.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/delicious'); $crawler = $client->request('GET', '/import/delicious');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/delicious_export.2021.02.06_21.10.json', 'delicious.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/delicious_export.2021.02.06_21.10.json', 'delicious.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -140,7 +140,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/delicious'); $crawler = $client->request('GET', '/import/delicious');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/delicious_export.2021.02.06_21.10.json', 'delicious-read.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/delicious_export.2021.02.06_21.10.json', 'delicious-read.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -185,7 +185,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/delicious'); $crawler = $client->request('GET', '/import/delicious');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -72,7 +72,7 @@ class ElcuratorControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/elcurator.json', 'elcurator.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/elcurator.json', 'elcurator.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -100,7 +100,7 @@ class ElcuratorControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/elcurator'); $crawler = $client->request('GET', '/import/elcurator');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/elcurator.json', 'elcurator.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/elcurator.json', 'elcurator.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/firefox-bookmarks.json', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/firefox-bookmarks.json', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/firefox'); $crawler = $client->request('GET', '/import/firefox');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/firefox-bookmarks.json', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/firefox-bookmarks.json', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -154,7 +154,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/firefox'); $crawler = $client->request('GET', '/import/firefox');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/instapaper-export.csv', 'instapaper.csv'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/instapaper-export.csv', 'instapaper.csv');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/instapaper'); $crawler = $client->request('GET', '/import/instapaper');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/instapaper-export.csv', 'instapaper.csv'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/instapaper-export.csv', 'instapaper.csv');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -153,7 +153,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/instapaper'); $crawler = $client->request('GET', '/import/instapaper');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/instapaper-export.csv', 'instapaper-read.csv'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/instapaper-export.csv', 'instapaper-read.csv');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -198,7 +198,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/instapaper'); $crawler = $client->request('GET', '/import/instapaper');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/pinboard_export', 'pinboard.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/pinboard_export', 'pinboard.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/pinboard'); $crawler = $client->request('GET', '/import/pinboard');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/pinboard_export', 'pinboard.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/pinboard_export', 'pinboard.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -145,7 +145,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/pinboard'); $crawler = $client->request('GET', '/import/pinboard');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/pinboard_export', 'pinboard-read.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/pinboard_export', 'pinboard-read.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -192,7 +192,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/pinboard'); $crawler = $client->request('GET', '/import/pinboard');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class PocketHtmlControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/ril_export.html', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/ril_export.html', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class PocketHtmlControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/pocket_html'); $crawler = $client->request('GET', '/import/pocket_html');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/ril_export.html', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/ril_export.html', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -150,7 +150,7 @@ class PocketHtmlControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/pocket_html'); $crawler = $client->request('GET', '/import/pocket_html');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.html', 'test.html'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.html', 'test.html');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/readability.json', 'readability.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/readability.json', 'readability.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/readability'); $crawler = $client->request('GET', '/import/readability');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/readability.json', 'readability.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/readability.json', 'readability.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -143,7 +143,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/readability'); $crawler = $client->request('GET', '/import/readability');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/readability-read.json', 'readability-read.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/readability-read.json', 'readability-read.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -190,7 +190,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/readability'); $crawler = $client->request('GET', '/import/readability');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -71,7 +71,7 @@ class ShaarliControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/shaarli-bookmarks.html', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/shaarli-bookmarks.html', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -99,7 +99,7 @@ class ShaarliControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/shaarli'); $crawler = $client->request('GET', '/import/shaarli');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/shaarli-bookmarks.html', 'Bookmarks'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/shaarli-bookmarks.html', 'Bookmarks');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -150,7 +150,7 @@ class ShaarliControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/shaarli'); $crawler = $client->request('GET', '/import/shaarli');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.html', 'test.html'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.html', 'test.html');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -72,7 +72,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v1.json', 'wallabag-v1.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v1.json', 'wallabag-v1.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -100,7 +100,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/wallabag-v1'); $crawler = $client->request('GET', '/import/wallabag-v1');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v1.json', 'wallabag-v1.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v1.json', 'wallabag-v1.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -144,7 +144,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/wallabag-v1'); $crawler = $client->request('GET', '/import/wallabag-v1');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v1-read.json', 'wallabag-v1-read.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v1-read.json', 'wallabag-v1-read.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -191,7 +191,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/wallabag-v1'); $crawler = $client->request('GET', '/import/wallabag-v1');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Wallabag\ImportBundle\Controller; namespace Tests\Wallabag\CoreBundle\Controller\Import;
use Craue\ConfigBundle\Util\Config; use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -72,7 +72,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v2.json', 'wallabag-v2.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v2.json', 'wallabag-v2.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -100,7 +100,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/wallabag-v2'); $crawler = $client->request('GET', '/import/wallabag-v2');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v2.json', 'wallabag-v2.json'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v2.json', 'wallabag-v2.json');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,
@ -166,7 +166,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/import/wallabag-v2'); $crawler = $client->request('GET', '/import/wallabag-v2');
$form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
$file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt');
$data = [ $data = [
'upload_import_file[file]' => $file, 'upload_import_file[file]' => $file,

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -38,7 +38,7 @@ class ChromeImportTest extends TestCase
public function testImport() public function testImport()
{ {
$chromeImport = $this->getChromeImport(false, 1); $chromeImport = $this->getChromeImport(false, 1);
$chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -71,7 +71,7 @@ class ChromeImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$chromeImport = $this->getChromeImport(false, 1); $chromeImport = $this->getChromeImport(false, 1);
$chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -109,7 +109,7 @@ class ChromeImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$chromeImport = $this->getChromeImport(); $chromeImport = $this->getChromeImport();
$chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -149,7 +149,7 @@ class ChromeImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$chromeImport = $this->getChromeImport(); $chromeImport = $this->getChromeImport();
$chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -189,7 +189,7 @@ class ChromeImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$chromeImport = $this->getChromeImport(); $chromeImport = $this->getChromeImport();
$chromeImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $chromeImport->import(); $res = $chromeImport->import();
@ -203,7 +203,7 @@ class ChromeImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$chromeImport = $this->getChromeImport(true); $chromeImport = $this->getChromeImport(true);
$chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks');
$res = $chromeImport->import(); $res = $chromeImport->import();

View file

@ -38,7 +38,7 @@ class FirefoxImportTest extends TestCase
public function testImport() public function testImport()
{ {
$firefoxImport = $this->getFirefoxImport(false, 2); $firefoxImport = $this->getFirefoxImport(false, 2);
$firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -71,7 +71,7 @@ class FirefoxImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$firefoxImport = $this->getFirefoxImport(false, 1); $firefoxImport = $this->getFirefoxImport(false, 1);
$firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -109,7 +109,7 @@ class FirefoxImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$firefoxImport = $this->getFirefoxImport(); $firefoxImport = $this->getFirefoxImport();
$firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -149,7 +149,7 @@ class FirefoxImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$firefoxImport = $this->getFirefoxImport(); $firefoxImport = $this->getFirefoxImport();
$firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -189,7 +189,7 @@ class FirefoxImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$firefoxImport = $this->getFirefoxImport(); $firefoxImport = $this->getFirefoxImport();
$firefoxImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $firefoxImport->import(); $res = $firefoxImport->import();
@ -203,7 +203,7 @@ class FirefoxImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$firefoxImport = $this->getFirefoxImport(true); $firefoxImport = $this->getFirefoxImport(true);
$firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json');
$res = $firefoxImport->import(); $res = $firefoxImport->import();

View file

@ -40,7 +40,7 @@ class InstapaperImportTest extends TestCase
public function testImport() public function testImport()
{ {
$instapaperImport = $this->getInstapaperImport(false, 4); $instapaperImport = $this->getInstapaperImport(false, 4);
$instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -73,7 +73,7 @@ class InstapaperImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$instapaperImport = $this->getInstapaperImport(false, 1); $instapaperImport = $this->getInstapaperImport(false, 1);
$instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -111,7 +111,7 @@ class InstapaperImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$instapaperImport = $this->getInstapaperImport(); $instapaperImport = $this->getInstapaperImport();
$instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -151,7 +151,7 @@ class InstapaperImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$instapaperImport = $this->getInstapaperImport(); $instapaperImport = $this->getInstapaperImport();
$instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -191,7 +191,7 @@ class InstapaperImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$instapaperImport = $this->getInstapaperImport(); $instapaperImport = $this->getInstapaperImport();
$instapaperImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $instapaperImport->import(); $res = $instapaperImport->import();
@ -205,7 +205,7 @@ class InstapaperImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$instapaperImport = $this->getInstapaperImport(true); $instapaperImport = $this->getInstapaperImport(true);
$instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv');
$res = $instapaperImport->import(); $res = $instapaperImport->import();

View file

@ -38,7 +38,7 @@ class PocketHtmlImportTest extends TestCase
public function testImport() public function testImport()
{ {
$pocketHtmlImport = $this->getPocketHtmlImport(false, 2); $pocketHtmlImport = $this->getPocketHtmlImport(false, 2);
$pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -71,7 +71,7 @@ class PocketHtmlImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$pocketHtmlImport = $this->getPocketHtmlImport(false, 1); $pocketHtmlImport = $this->getPocketHtmlImport(false, 1);
$pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -111,7 +111,7 @@ class PocketHtmlImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$pocketHtmlImport = $this->getPocketHtmlImport(); $pocketHtmlImport = $this->getPocketHtmlImport();
$pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -151,7 +151,7 @@ class PocketHtmlImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$pocketHtmlImport = $this->getPocketHtmlImport(); $pocketHtmlImport = $this->getPocketHtmlImport();
$pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -191,7 +191,7 @@ class PocketHtmlImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$pocketHtmlImport = $this->getPocketHtmlImport(); $pocketHtmlImport = $this->getPocketHtmlImport();
$pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $pocketHtmlImport->import(); $res = $pocketHtmlImport->import();
@ -205,7 +205,7 @@ class PocketHtmlImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$pocketHtmlImport = $this->getPocketHtmlImport(true); $pocketHtmlImport = $this->getPocketHtmlImport(true);
$pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html');
$res = $pocketHtmlImport->import(); $res = $pocketHtmlImport->import();

View file

@ -38,7 +38,7 @@ class ReadabilityImportTest extends TestCase
public function testImport() public function testImport()
{ {
$readabilityImport = $this->getReadabilityImport(false, 3); $readabilityImport = $this->getReadabilityImport(false, 3);
$readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -71,7 +71,7 @@ class ReadabilityImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$readabilityImport = $this->getReadabilityImport(false, 1); $readabilityImport = $this->getReadabilityImport(false, 1);
$readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability-read.json'); $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability-read.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -109,7 +109,7 @@ class ReadabilityImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$readabilityImport = $this->getReadabilityImport(); $readabilityImport = $this->getReadabilityImport();
$readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -149,7 +149,7 @@ class ReadabilityImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$readabilityImport = $this->getReadabilityImport(); $readabilityImport = $this->getReadabilityImport();
$readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -189,7 +189,7 @@ class ReadabilityImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$readabilityImport = $this->getReadabilityImport(); $readabilityImport = $this->getReadabilityImport();
$readabilityImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $readabilityImport->import(); $res = $readabilityImport->import();
@ -203,7 +203,7 @@ class ReadabilityImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$readabilityImport = $this->getReadabilityImport(true); $readabilityImport = $this->getReadabilityImport(true);
$readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json');
$res = $readabilityImport->import(); $res = $readabilityImport->import();

View file

@ -38,7 +38,7 @@ class ShaarliImportTest extends TestCase
public function testImport() public function testImport()
{ {
$shaarliImport = $this->getShaarliImport(false, 2); $shaarliImport = $this->getShaarliImport(false, 2);
$shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -71,7 +71,7 @@ class ShaarliImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$shaarliImport = $this->getShaarliImport(false, 1); $shaarliImport = $this->getShaarliImport(false, 1);
$shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -111,7 +111,7 @@ class ShaarliImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$shaarliImport = $this->getShaarliImport(); $shaarliImport = $this->getShaarliImport();
$shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -151,7 +151,7 @@ class ShaarliImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$shaarliImport = $this->getShaarliImport(); $shaarliImport = $this->getShaarliImport();
$shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -191,7 +191,7 @@ class ShaarliImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$shaarliImport = $this->getShaarliImport(); $shaarliImport = $this->getShaarliImport();
$shaarliImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $shaarliImport->import(); $res = $shaarliImport->import();
@ -205,7 +205,7 @@ class ShaarliImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$shaarliImport = $this->getShaarliImport(true); $shaarliImport = $this->getShaarliImport(true);
$shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html');
$res = $shaarliImport->import(); $res = $shaarliImport->import();

View file

@ -42,7 +42,7 @@ class WallabagV1ImportTest extends TestCase
public function testImport() public function testImport()
{ {
$wallabagV1Import = $this->getWallabagV1Import(false, 1); $wallabagV1Import = $this->getWallabagV1Import(false, 1);
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -75,7 +75,7 @@ class WallabagV1ImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$wallabagV1Import = $this->getWallabagV1Import(false, 3); $wallabagV1Import = $this->getWallabagV1Import(false, 3);
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1-read.json'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1-read.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -113,7 +113,7 @@ class WallabagV1ImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$wallabagV1Import = $this->getWallabagV1Import(); $wallabagV1Import = $this->getWallabagV1Import();
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -153,7 +153,7 @@ class WallabagV1ImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$wallabagV1Import = $this->getWallabagV1Import(); $wallabagV1Import = $this->getWallabagV1Import();
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -193,7 +193,7 @@ class WallabagV1ImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$wallabagV1Import = $this->getWallabagV1Import(); $wallabagV1Import = $this->getWallabagV1Import();
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx');
$res = $wallabagV1Import->import(); $res = $wallabagV1Import->import();
@ -207,7 +207,7 @@ class WallabagV1ImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$wallabagV1Import = $this->getWallabagV1Import(true); $wallabagV1Import = $this->getWallabagV1Import(true);
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json');
$res = $wallabagV1Import->import(); $res = $wallabagV1Import->import();

View file

@ -40,7 +40,7 @@ class WallabagV2ImportTest extends TestCase
public function testImport() public function testImport()
{ {
$wallabagV2Import = $this->getWallabagV2Import(false, 2); $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) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -69,7 +69,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportAndMarkAllAsRead() public function testImportAndMarkAllAsRead()
{ {
$wallabagV2Import = $this->getWallabagV2Import(false, 2); $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) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -107,7 +107,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportWithRabbit() public function testImportWithRabbit()
{ {
$wallabagV2Import = $this->getWallabagV2Import(); $wallabagV2Import = $this->getWallabagV2Import();
$wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -143,7 +143,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportWithRedis() public function testImportWithRedis()
{ {
$wallabagV2Import = $this->getWallabagV2Import(); $wallabagV2Import = $this->getWallabagV2Import();
$wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json');
$entryRepo = $this->getMockBuilder(EntryRepository::class) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
@ -179,7 +179,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportBadFile() public function testImportBadFile()
{ {
$wallabagV1Import = $this->getWallabagV2Import(); $wallabagV1Import = $this->getWallabagV2Import();
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.jsonx'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.jsonx');
$res = $wallabagV1Import->import(); $res = $wallabagV1Import->import();
@ -193,7 +193,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportUserNotDefined() public function testImportUserNotDefined()
{ {
$wallabagV1Import = $this->getWallabagV2Import(true); $wallabagV1Import = $this->getWallabagV2Import(true);
$wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json');
$res = $wallabagV1Import->import(); $res = $wallabagV1Import->import();
@ -207,7 +207,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportEmptyFile() public function testImportEmptyFile()
{ {
$wallabagV2Import = $this->getWallabagV2Import(); $wallabagV2Import = $this->getWallabagV2Import();
$wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2-empty.json'); $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-empty.json');
$res = $wallabagV2Import->import(); $res = $wallabagV2Import->import();
@ -218,7 +218,7 @@ class WallabagV2ImportTest extends TestCase
public function testImportWithExceptionFromGraby() public function testImportWithExceptionFromGraby()
{ {
$wallabagV2Import = $this->getWallabagV2Import(false, 2); $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) $entryRepo = $this->getMockBuilder(EntryRepository::class)
->disableOriginalConstructor() ->disableOriginalConstructor()