diff --git a/cookbook/console/console_command.rst b/cookbook/console/console_command.rst index 303a9ee45ed..fa7db6f1673 100644 --- a/cookbook/console/console_command.rst +++ b/cookbook/console/console_command.rst @@ -159,7 +159,6 @@ instead of $commandTester = new CommandTester($command); $commandTester->execute( array( - 'command' => $command->getName(), 'name' => 'Fabien', '--yell' => true, ) @@ -171,6 +170,11 @@ instead of } } +.. versionadded:: 2.4 + Since Symfony 2.4, the ``CommandTester`` automatically detects the name of + the command to execute. Thus, you don't need to pass it via the ``command`` + argument anymore. + .. note:: In the specific case above, the ``name`` parameter and the ``--yell`` option @@ -200,7 +204,6 @@ you can extend your test from $commandTester = new CommandTester($command); $commandTester->execute( array( - 'command' => $command->getName(), 'name' => 'Fabien', '--yell' => true, )