diff --git a/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php b/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php index 29f8cd294..354950030 100644 --- a/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php @@ -18,9 +18,7 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:clean-duplicates'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('Cleaning through 3 user accounts', $tester->getDisplay()); $this->assertStringContainsString('Finished cleaning. 0 duplicates found in total', $tester->getDisplay()); @@ -34,7 +32,6 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'unknown', ]); @@ -49,7 +46,6 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); @@ -89,7 +85,6 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); diff --git a/tests/Wallabag/CoreBundle/Command/ExportCommandTest.php b/tests/Wallabag/CoreBundle/Command/ExportCommandTest.php index 4e8d4c0d0..ef2c8cd66 100644 --- a/tests/Wallabag/CoreBundle/Command/ExportCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/ExportCommandTest.php @@ -19,9 +19,7 @@ class ExportCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:export'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); } public function testExportCommandWithBadUsername() @@ -32,7 +30,6 @@ class ExportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'unknown', ]); @@ -47,7 +44,6 @@ class ExportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); @@ -64,7 +60,6 @@ class ExportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', 'filepath' => 'specialexport.json', ]); diff --git a/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php b/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php index d09515804..d76cc4b39 100644 --- a/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php @@ -18,9 +18,7 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:generate-hashed-urls'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('Generating hashed urls for "3" users', $tester->getDisplay()); $this->assertStringContainsString('Finished generated hashed urls', $tester->getDisplay()); @@ -34,7 +32,6 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'unknown', ]); @@ -49,7 +46,6 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); @@ -78,7 +74,6 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php index 5ac86e05e..40f01f1e3 100644 --- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php @@ -98,9 +98,7 @@ class InstallCommandTest extends WallabagCoreTestCase 'password_' . uniqid('', true), // password 'email_' . uniqid('', true) . '@wallabag.it', // email ]); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('Checking system requirements.', $tester->getDisplay()); $this->assertStringContainsString('Setting up database.', $tester->getDisplay()); @@ -124,7 +122,6 @@ class InstallCommandTest extends WallabagCoreTestCase 'email_' . uniqid('', true) . '@wallabag.it', // email ]); $tester->execute([ - 'command' => $command->getName(), '--reset' => true, ]); @@ -151,7 +148,6 @@ class InstallCommandTest extends WallabagCoreTestCase // drop database first, so the install command won't ask to reset things $command = $application->find('doctrine:database:drop'); $command->run(new ArrayInput([ - 'command' => 'doctrine:database:drop', '--force' => true, ]), new NullOutput()); @@ -168,9 +164,7 @@ class InstallCommandTest extends WallabagCoreTestCase 'password_' . uniqid('', true), // password 'email_' . uniqid('', true) . '@wallabag.it', // email ]); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('Checking system requirements.', $tester->getDisplay()); $this->assertStringContainsString('Setting up database.', $tester->getDisplay()); @@ -195,9 +189,7 @@ class InstallCommandTest extends WallabagCoreTestCase 'y', // do want to reset the schema 'n', // don't want to create a new user ]); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('Checking system requirements.', $tester->getDisplay()); $this->assertStringContainsString('Setting up database.', $tester->getDisplay()); @@ -214,17 +206,13 @@ class InstallCommandTest extends WallabagCoreTestCase // drop database first, so the install command won't ask to reset things $command = $application->find('doctrine:database:drop'); $command->run(new ArrayInput([ - 'command' => 'doctrine:database:drop', '--force' => true, ]), new NullOutput()); $this->getClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->close(); $command = $application->find('doctrine:database:create'); - $command->run(new ArrayInput([ - 'command' => 'doctrine:database:create', - '--env' => 'test', - ]), new NullOutput()); + $command->run(new ArrayInput([]), new NullOutput()); $command = $application->find('wallabag:install'); @@ -233,9 +221,7 @@ class InstallCommandTest extends WallabagCoreTestCase 'n', // don't want to reset the entire database 'n', // don't want to create a new user ]); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('Checking system requirements.', $tester->getDisplay()); $this->assertStringContainsString('Setting up database.', $tester->getDisplay()); @@ -254,9 +240,7 @@ class InstallCommandTest extends WallabagCoreTestCase $command->disableRunOtherCommands(); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ], [ + $tester->execute([], [ 'interactive' => false, ]); diff --git a/tests/Wallabag/CoreBundle/Command/ListUserCommandTest.php b/tests/Wallabag/CoreBundle/Command/ListUserCommandTest.php index 69696bdc3..05d73aa4b 100644 --- a/tests/Wallabag/CoreBundle/Command/ListUserCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/ListUserCommandTest.php @@ -15,9 +15,7 @@ class ListUserCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:user:list'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); $this->assertStringContainsString('3/3 user(s) displayed.', $tester->getDisplay()); } @@ -30,7 +28,6 @@ class ListUserCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), '--limit' => 2, ]); @@ -45,7 +42,6 @@ class ListUserCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'search' => 'boss', ]); @@ -60,7 +56,6 @@ class ListUserCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'search' => 'bo', '--limit' => 1, ]); diff --git a/tests/Wallabag/CoreBundle/Command/ReloadEntryCommandTest.php b/tests/Wallabag/CoreBundle/Command/ReloadEntryCommandTest.php index 45cacf117..a91a7e561 100644 --- a/tests/Wallabag/CoreBundle/Command/ReloadEntryCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/ReloadEntryCommandTest.php @@ -53,9 +53,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:entry:reload'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ], [ + $tester->execute([], [ 'interactive' => false, ]); @@ -81,7 +79,6 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:entry:reload'); $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ], [ 'interactive' => false, @@ -105,7 +102,6 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:entry:reload'); $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'empty', ], [ 'interactive' => false, diff --git a/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php b/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php index 51f8b2eb7..d2bb583a3 100644 --- a/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php @@ -21,9 +21,7 @@ class ShowUserCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:user:show'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); } public function testRunShowUserCommandWithBadUsername() @@ -34,7 +32,6 @@ class ShowUserCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'unknown', ]); @@ -49,7 +46,6 @@ class ShowUserCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); @@ -81,7 +77,6 @@ class ShowUserCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); diff --git a/tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php b/tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php index 4fea25aae..d7b3553ac 100644 --- a/tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php @@ -19,9 +19,7 @@ class TagAllCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:tag:all'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); } public function testRunTagAllCommandWithBadUsername() @@ -32,7 +30,6 @@ class TagAllCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'unknown', ]); @@ -47,7 +44,6 @@ class TagAllCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', ]); diff --git a/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php b/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php index 36ee76dbf..ec3df0f7a 100644 --- a/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php +++ b/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php @@ -21,9 +21,7 @@ class ImportCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:import'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); } public function testRunImportCommandWithoutFilepath() @@ -37,7 +35,6 @@ class ImportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', 'filepath' => 1, ]); @@ -53,7 +50,6 @@ class ImportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'random', 'filepath' => './', ]); @@ -67,7 +63,6 @@ class ImportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => 'admin', 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json', '--importer' => 'v2', @@ -87,7 +82,6 @@ class ImportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'username' => $this->getLoggedInUserId(), 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json', '--useUserId' => true, diff --git a/tests/Wallabag/ImportBundle/Command/RedisWorkerCommandTest.php b/tests/Wallabag/ImportBundle/Command/RedisWorkerCommandTest.php index a8c79dc0e..aebeaab5d 100644 --- a/tests/Wallabag/ImportBundle/Command/RedisWorkerCommandTest.php +++ b/tests/Wallabag/ImportBundle/Command/RedisWorkerCommandTest.php @@ -22,9 +22,7 @@ class RedisWorkerCommandTest extends WallabagCoreTestCase $command = $application->find('wallabag:import:redis-worker'); $tester = new CommandTester($command); - $tester->execute([ - 'command' => $command->getName(), - ]); + $tester->execute([]); } public function testRunRedisWorkerCommandWithBadService() @@ -38,7 +36,6 @@ class RedisWorkerCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'serviceName' => 'YOMONSERVICE', ]); } @@ -60,7 +57,6 @@ class RedisWorkerCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ - 'command' => $command->getName(), 'serviceName' => 'readability', '--maxIterations' => 1, ]);