Move to Symfony Flex
The structure changed completely. Bundles are gone. Everything is flatten in the folder `src`. I separated import & api controllers to avoid _pollution_ in the main controller folder.
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class CleanDuplicatesCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -93,7 +93,7 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase
|
||||
$nbEntries = $em->getRepository(Entry::class)->findAllByUrlAndUserId($url, $this->getLoggedInUserId());
|
||||
$this->assertCount(1, $nbEntries);
|
||||
|
||||
$query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
|
||||
$query = $em->createQuery('DELETE FROM App\Entity\Entry e WHERE e.url = :url');
|
||||
$query->setParameter('url', $url);
|
||||
$query->execute();
|
||||
}
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Exception\RuntimeException;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
|
||||
class ExportCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -83,7 +83,7 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertSame($entry->getHashedUrl(), hash('sha1', $url));
|
||||
|
||||
$query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
|
||||
$query = $em->createQuery('DELETE FROM App\Entity\Entry e WHERE e.url = :url');
|
||||
$query->setParameter('url', $url);
|
||||
$query->execute();
|
||||
}
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\NoResultException;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
use Symfony\Component\Console\Exception\RuntimeException;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
|
||||
class ImportCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -64,7 +64,7 @@ class ImportCommandTest extends WallabagCoreTestCase
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute([
|
||||
'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/fixtures/wallabag-v2-read.json',
|
||||
'--importer' => 'v2',
|
||||
]);
|
||||
|
||||
@ -83,7 +83,7 @@ class ImportCommandTest extends WallabagCoreTestCase
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute([
|
||||
'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/fixtures/wallabag-v2-read.json',
|
||||
'--useUserId' => true,
|
||||
'--importer' => 'v2',
|
||||
]);
|
||||
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Command\InstallCommand;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
@ -12,8 +14,6 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Command\InstallCommand;
|
||||
|
||||
class InstallCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
|
||||
class ListUserCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
use Predis\Client;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
use Symfony\Component\Console\Exception\RuntimeException;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
|
||||
class RedisWorkerCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class ReloadEntryCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Exception\RuntimeException;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ShowUserCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Command;
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Exception\RuntimeException;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
|
||||
class TagAllCommandTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Consumer;
|
||||
namespace App\Tests\Consumer;
|
||||
|
||||
use App\Consumer\AMQPEntryConsumer;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Import\AbstractImport;
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use PhpAmqpLib\Message\AMQPMessage;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer;
|
||||
use Wallabag\ImportBundle\Import\AbstractImport;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class AMQPEntryConsumerTest extends TestCase
|
||||
{
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Consumer;
|
||||
namespace App\Tests\Consumer;
|
||||
|
||||
use App\Consumer\RedisEntryConsumer;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Import\AbstractImport;
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\ImportBundle\Consumer\RedisEntryConsumer;
|
||||
use Wallabag\ImportBundle\Import\AbstractImport;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class RedisEntryConsumerTest extends TestCase
|
||||
{
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\AnnotationBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\Annotation;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagAnnotationTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\AnnotationBundle\WallabagAnnotationTestCase;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class AnnotationControllerTest extends WallabagAnnotationTestCase
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
|
||||
class ConfigRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\Tag;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class EntryRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
|
||||
class SearchRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\Tag;
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
|
||||
class TagRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
|
||||
class TaggingRuleRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
|
||||
class UserRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace App\Tests\Controller\Api;
|
||||
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use App\Tests\WallabagApiTestCase;
|
||||
|
||||
class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -17,7 +17,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
$content = json_decode($client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertSame($client->getContainer()->getParameter('wallabag_core.version'), $content);
|
||||
$this->assertSame($client->getContainer()->getParameter('wallabag.version'), $content);
|
||||
}
|
||||
|
||||
public function testGetInfo()
|
||||
@ -1,20 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\Annotation;
|
||||
use App\Entity\Config as ConfigEntity;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\IgnoreOriginUserRule;
|
||||
use App\Entity\Tag;
|
||||
use App\Entity\TaggingRule;
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
use Wallabag\CoreBundle\Entity\Config as ConfigEntity;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ConfigControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
namespace Tests\Controller;
|
||||
|
||||
use App\Entity\Client;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
|
||||
class DeveloperControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\Annotation;
|
||||
use App\Entity\Config as ConfigEntity;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\SiteCredential;
|
||||
use App\Entity\Tag;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\CryptoProxy;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
use Wallabag\CoreBundle\Entity\Config as ConfigEntity;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\SiteCredential;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\CryptoProxy;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class EntryControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -541,7 +541,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||
->getRepository(Entry::class)
|
||||
->find($entry->getId());
|
||||
|
||||
$this->assertNotSame($client->getContainer()->getParameter('wallabag_core.fetching_error_message'), $newContent->getContent());
|
||||
$this->assertNotSame($client->getContainer()->getParameter('wallabag.fetching_error_message'), $newContent->getContent());
|
||||
}
|
||||
|
||||
public function testEdit()
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class ExportControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class FeedControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
class IgnoreOriginInstanceRuleControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class ChromeControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -71,7 +71,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/chrome-bookmarks', 'Bookmarks');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -99,7 +99,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/chrome');
|
||||
$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/chrome-bookmarks', 'Bookmarks');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -140,7 +140,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/chrome');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class DeliciousControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -71,7 +71,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/delicious_export.2021.02.06_21.10.json', 'delicious.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -99,7 +99,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/delicious');
|
||||
$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/delicious_export.2021.02.06_21.10.json', 'delicious.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -140,7 +140,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/delicious');
|
||||
$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/delicious_export.2021.02.06_21.10.json', 'delicious-read.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -185,7 +185,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/delicious');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class ElcuratorControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -72,7 +72,7 @@ class ElcuratorControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/elcurator.json', 'elcurator.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -100,7 +100,7 @@ class ElcuratorControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/elcurator');
|
||||
$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/elcurator.json', 'elcurator.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class FirefoxControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -71,7 +71,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/firefox-bookmarks.json', 'Bookmarks');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -99,7 +99,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/firefox');
|
||||
$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/firefox-bookmarks.json', 'Bookmarks');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -154,7 +154,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/firefox');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
class ImportControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -10,7 +10,7 @@ class ImportControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
$client = $this->getTestClient();
|
||||
|
||||
$client->request('GET', '/import/');
|
||||
$client->request('GET', '/import');
|
||||
|
||||
$this->assertSame(302, $client->getResponse()->getStatusCode());
|
||||
$this->assertStringContainsString('login', $client->getResponse()->headers->get('location'));
|
||||
@ -21,7 +21,7 @@ class ImportControllerTest extends WallabagCoreTestCase
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
||||
$crawler = $client->request('GET', '/import/');
|
||||
$crawler = $client->request('GET', '/import');
|
||||
|
||||
$this->assertSame(200, $client->getResponse()->getStatusCode());
|
||||
$this->assertSame(10, $crawler->filter('blockquote')->count());
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -71,7 +71,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/instapaper-export.csv', 'instapaper.csv');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -99,7 +99,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/instapaper');
|
||||
$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/instapaper-export.csv', 'instapaper.csv');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -153,7 +153,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/instapaper');
|
||||
$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/instapaper-export.csv', 'instapaper-read.csv');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -198,7 +198,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/instapaper');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class PinboardControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -71,7 +71,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/pinboard_export', 'pinboard.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -99,7 +99,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/pinboard');
|
||||
$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/pinboard_export', 'pinboard.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -145,7 +145,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/pinboard');
|
||||
$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/pinboard_export', 'pinboard-read.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -192,7 +192,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/pinboard');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Import\PocketImport;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\ImportBundle\Import\PocketImport;
|
||||
|
||||
class PocketControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class ReadabilityControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -71,7 +71,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/readability.json', 'readability.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -99,7 +99,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/readability');
|
||||
$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/readability.json', 'readability.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -143,7 +143,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/readability');
|
||||
$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/readability-read.json', 'readability-read.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -190,7 +190,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/readability');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -72,7 +72,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/wallabag-v1.json', 'wallabag-v1.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -100,7 +100,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/wallabag-v1');
|
||||
$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/wallabag-v1.json', 'wallabag-v1.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -144,7 +144,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/wallabag-v1');
|
||||
$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/wallabag-v1-read.json', 'wallabag-v1-read.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -191,7 +191,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/wallabag-v1');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Controller;
|
||||
namespace App\Tests\Controller\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Predis\Client;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -72,7 +72,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$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/wallabag-v2.json', 'wallabag-v2.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -100,7 +100,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/wallabag-v2');
|
||||
$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/wallabag-v2.json', 'wallabag-v2.json');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -166,7 +166,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/import/wallabag-v2');
|
||||
$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/test.txt', 'test.txt');
|
||||
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class SecurityControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
/**
|
||||
* The controller `SettingsController` does not exist.
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\SiteCredential;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Client;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\SiteCredential;
|
||||
|
||||
class SiteCredentialControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
class StaticControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\Tag;
|
||||
use App\Entity\User;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
/**
|
||||
* @group Tag
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\UserBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
class ManageControllerTest extends WallabagCoreTestCase
|
||||
class UserControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
public function testLogin()
|
||||
{
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Entity;
|
||||
namespace App\Tests\Entity;
|
||||
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use App\Entity\Entry;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
|
||||
class EntryTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Event\Listener;
|
||||
namespace App\Tests\Event\Listener;
|
||||
|
||||
use App\Event\Listener\LocaleListener;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@ -10,7 +11,6 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
use Wallabag\CoreBundle\Event\Listener\LocaleListener;
|
||||
|
||||
class LocaleListenerTest extends TestCase
|
||||
{
|
||||
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Event\Listener;
|
||||
namespace App\Tests\Event\Listener;
|
||||
|
||||
use App\Entity\Config;
|
||||
use App\Entity\User;
|
||||
use App\Event\Listener\UserLocaleListener;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\CoreBundle\Event\Listener\UserLocaleListener;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class UserLocaleListenerTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Event\Subscriber;
|
||||
namespace App\Tests\Event\Subscriber;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Event\Subscriber\TablePrefixSubscriber;
|
||||
use Doctrine\Common\EventManager;
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
@ -10,8 +12,6 @@ use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class TablePrefixSubscriberTest extends TestCase
|
||||
{
|
||||
@ -93,7 +93,7 @@ class TablePrefixSubscriberTest extends TestCase
|
||||
|
||||
$subscriber = new TablePrefixSubscriber('yo_');
|
||||
|
||||
$metaClass = new ClassMetadata('Wallabag\UserBundle\Entity\Entry');
|
||||
$metaClass = new ClassMetadata('\Entity\Entry');
|
||||
$metaClass->setPrimaryTable(['name' => 'entry']);
|
||||
$metaClass->mapManyToMany([
|
||||
'fieldName' => 'tags',
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\UserBundle\EventListener;
|
||||
namespace App\Tests\EventListener;
|
||||
|
||||
use App\EventListener\AuthenticationFailureListener;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -12,7 +13,6 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\AuthenticationEvents;
|
||||
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
|
||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||
use Wallabag\UserBundle\EventListener\AuthenticationFailureListener;
|
||||
|
||||
class AuthenticationFailureListenerTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\UserBundle\EventListener;
|
||||
namespace App\Tests\EventListener;
|
||||
|
||||
use App\Entity\Config;
|
||||
use App\Entity\User;
|
||||
use App\EventListener\CreateConfigListener;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
||||
use FOS\UserBundle\FOSUserEvents;
|
||||
@ -11,9 +14,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\EventListener\CreateConfigListener;
|
||||
|
||||
class CreateConfigListenerTest extends TestCase
|
||||
{
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Form\DataTransformer;
|
||||
namespace App\Tests\Form\DataTransformer;
|
||||
|
||||
use App\Form\DataTransformer\StringToListTransformer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
|
||||
|
||||
class StringToListTransformerTest extends TestCase
|
||||
{
|
||||
@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator;
|
||||
namespace App\Tests\GuzzleSiteAuthenticator;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
|
||||
use App\Repository\SiteCredentialRepository;
|
||||
use App\Tests\WallabagCoreTestCase;
|
||||
use Graby\SiteConfig\ConfigBuilder;
|
||||
use Graby\SiteConfig\SiteConfig as GrabySiteConfig;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
|
||||
use Wallabag\CoreBundle\Repository\SiteCredentialRepository;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
|
||||
{
|
||||
@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\RuleBasedIgnoreOriginProcessor;
|
||||
use App\Helper\RuleBasedTagger;
|
||||
use Graby\Graby;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
@ -10,11 +15,6 @@ use Psr\Log\NullLogger;
|
||||
use Symfony\Component\Validator\ConstraintViolation;
|
||||
use Symfony\Component\Validator\ConstraintViolationList;
|
||||
use Symfony\Component\Validator\Validator\RecursiveValidator;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor;
|
||||
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ContentProxyTest extends TestCase
|
||||
{
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Helper\CryptoProxy;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Log\NullLogger;
|
||||
use Wallabag\CoreBundle\Helper\CryptoProxy;
|
||||
|
||||
class CryptoProxyTest extends TestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Helper\DownloadImages;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use Http\Mock\Client as HttpMockClient;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Wallabag\CoreBundle\Helper\DownloadImages;
|
||||
|
||||
class DownloadImagesTest extends TestCase
|
||||
{
|
||||
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Entity\Config;
|
||||
use App\Entity\User;
|
||||
use App\Helper\Redirect;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Routing\Router;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\CoreBundle\Helper\Redirect;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class RedirectTest extends TestCase
|
||||
{
|
||||
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Entity\Config;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\IgnoreOriginInstanceRule;
|
||||
use App\Entity\IgnoreOriginUserRule;
|
||||
use App\Entity\User;
|
||||
use App\Helper\RuleBasedIgnoreOriginProcessor;
|
||||
use App\Repository\IgnoreOriginInstanceRuleRepository;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use RulerZ\RulerZ;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
|
||||
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
||||
use Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor;
|
||||
use Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class RuleBasedIgnoreOriginProcessorTest extends TestCase
|
||||
{
|
||||
@ -1,21 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Entity\Config;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\Tag;
|
||||
use App\Entity\TaggingRule;
|
||||
use App\Entity\User;
|
||||
use App\Helper\RuleBasedTagger;
|
||||
use App\Repository\EntryRepository;
|
||||
use App\Repository\TagRepository;
|
||||
use Doctrine\ORM\AbstractQuery;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\Logger;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use RulerZ\RulerZ;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\CoreBundle\Repository\TagRepository;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class RuleBasedTaggerTest extends TestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Helper;
|
||||
namespace App\Tests\Helper;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\Tag;
|
||||
use App\Entity\User;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Repository\TagRepository;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\TagRepository;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class TagsAssignerTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\ChromeImport;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
use Monolog\Handler\TestHandler;
|
||||
@ -10,13 +17,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\ChromeImport;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ChromeImportTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\FirefoxImport;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
use Monolog\Handler\TestHandler;
|
||||
@ -10,13 +17,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\FirefoxImport;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class FirefoxImportTest extends TestCase
|
||||
{
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Import\ImportChain;
|
||||
use App\Import\ImportInterface;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Wallabag\ImportBundle\Import\ImportChain;
|
||||
use Wallabag\ImportBundle\Import\ImportInterface;
|
||||
|
||||
class ImportChainTest extends TestCase
|
||||
{
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Import\ImportChain;
|
||||
use App\Import\ImportCompilerPass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Wallabag\ImportBundle\Import\ImportChain;
|
||||
use Wallabag\ImportBundle\Import\ImportCompilerPass;
|
||||
|
||||
class ImportCompilerPassTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\InstapaperImport;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\UnitOfWork;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
@ -11,13 +18,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\InstapaperImport;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class InstapaperImportTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Config;
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\PocketImport;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\UnitOfWork;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
@ -13,14 +21,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\PocketImport;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class PocketImportTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\ReadabilityImport;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
use Monolog\Handler\TestHandler;
|
||||
@ -10,13 +17,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\ReadabilityImport;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ReadabilityImportTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\WallabagV1Import;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\UnitOfWork;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
@ -11,13 +18,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\WallabagV1Import;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class WallabagV1ImportTest extends TestCase
|
||||
{
|
||||
@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ImportBundle\Import;
|
||||
namespace App\Tests\Import;
|
||||
|
||||
use App\Entity\Entry;
|
||||
use App\Entity\User;
|
||||
use App\Helper\ContentProxy;
|
||||
use App\Helper\TagsAssigner;
|
||||
use App\Import\WallabagV2Import;
|
||||
use App\Redis\Producer;
|
||||
use App\Repository\EntryRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\UnitOfWork;
|
||||
use M6Web\Component\RedisMock\RedisMockFactory;
|
||||
@ -11,13 +18,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Predis\Client;
|
||||
use Simpleue\Queue\RedisQueue;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\ImportBundle\Import\WallabagV2Import;
|
||||
use Wallabag\ImportBundle\Redis\Producer;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class WallabagV2ImportTest extends TestCase
|
||||
{
|
||||
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\UserBundle\Mailer;
|
||||
namespace App\Tests\Mailer;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Mailer\AuthCodeMailer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Mailer\MailerInterface;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use Twig\Environment;
|
||||
use Twig\Loader\ArrayLoader;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Mailer\AuthCodeMailer;
|
||||
|
||||
class AuthCodeMailerTest extends TestCase
|
||||
{
|
||||
@ -22,7 +22,7 @@ class AuthCodeMailerTest extends TestCase
|
||||
{% block body_text %}text body {{ support_url }}{% endblock %}
|
||||
TWIG;
|
||||
|
||||
$this->twig = new Environment(new ArrayLoader(['@WallabagUser/TwoFactor/email_auth_code.html.twig' => $twigTemplate]));
|
||||
$this->twig = new Environment(new ArrayLoader(['TwoFactor/email_auth_code.html.twig' => $twigTemplate]));
|
||||
}
|
||||
|
||||
public function testSendEmail()
|
||||
@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\ParamConverter;
|
||||
namespace App\Tests\ParamConverter;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\ParamConverter\UsernameFeedTokenConverter;
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\Persistence\Mapping\ClassMetadata;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
@ -9,9 +12,6 @@ use PHPUnit\Framework\TestCase;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class UsernameFeedTokenConverterTest extends TestCase
|
||||
{
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Tools;
|
||||
namespace App\Tests\Tools;
|
||||
|
||||
use App\Tools\Utils;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
use Wallabag\CoreBundle\Tools\Utils;
|
||||
|
||||
class UtilsTest extends TestCase
|
||||
{
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle\Twig;
|
||||
namespace App\Tests\Twig;
|
||||
|
||||
use App\Repository\EntryRepository;
|
||||
use App\Repository\TagRepository;
|
||||
use App\Twig\WallabagExtension;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\CoreBundle\Repository\TagRepository;
|
||||
use Wallabag\CoreBundle\Twig\WallabagExtension;
|
||||
|
||||
class WallabagExtensionTest extends TestCase
|
||||
{
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\AnnotationBundle;
|
||||
namespace App\Tests;
|
||||
|
||||
use FOS\UserBundle\Model\UserInterface;
|
||||
use FOS\UserBundle\Model\UserManager;
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\ApiBundle;
|
||||
namespace App\Tests;
|
||||
|
||||
use App\Entity\User;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use FOS\UserBundle\Model\UserInterface;
|
||||
use FOS\UserBundle\Model\UserManager;
|
||||
@ -11,7 +12,6 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Symfony\Component\BrowserKit\Cookie;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
abstract class WallabagApiTestCase extends WebTestCase
|
||||
{
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Wallabag\CoreBundle;
|
||||
namespace App\Tests;
|
||||
|
||||
use App\Entity\User;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Client;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
@ -11,7 +12,6 @@ use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
abstract class WallabagCoreTestCase extends WebTestCase
|
||||
{
|
||||
|
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 314 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |