From 17497275b2d956b692b173f2783e1b45bed80751 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 3 Sep 2022 02:21:43 +0200 Subject: [PATCH] Use find for remaining useless addition --- tests/Wallabag/CoreBundle/Command/InstallCommandTest.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php index a20a2fd3b..5ac86e05e 100644 --- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php @@ -3,8 +3,6 @@ namespace Tests\Wallabag\CoreBundle\Command; use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver; -use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; -use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Platforms\PostgreSqlPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; @@ -214,8 +212,7 @@ class InstallCommandTest extends WallabagCoreTestCase $application = new Application($this->getClient()->getKernel()); // drop database first, so the install command won't ask to reset things - $command = new DropDatabaseDoctrineCommand(); - $command->setApplication($application); + $command = $application->find('doctrine:database:drop'); $command->run(new ArrayInput([ 'command' => 'doctrine:database:drop', '--force' => true, @@ -223,8 +220,7 @@ class InstallCommandTest extends WallabagCoreTestCase $this->getClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->close(); - $command = new CreateDatabaseDoctrineCommand(); - $command->setApplication($application); + $command = $application->find('doctrine:database:create'); $command->run(new ArrayInput([ 'command' => 'doctrine:database:create', '--env' => 'test',