Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] CommandTester doesn't set the executed command's name #8625

Closed
@xabbuh

Description

@xabbuh

The default input definition of the Console Component requires a command argument (s. Symfony\Component\Console\Application::getDefaultInputDefinition()). When you try to execute a command which has no arguments using the CommandTester you have to pass a command argument (with an arbitrary value) (s. example Gist). Otherwise, you receive a RuntimeException (see also symfony/symfony-docs#2870):

RuntimeException: Not enough arguments in Symfony\Component\Console\Input\Input on line 76

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions