CommandTester
class CommandTester
Eases the testing of console commands.
Traits
Methods
Gets the display returned by the last execution of the command or application.
Gets the output written to STDERR by the application.
Gets the input instance used by the last execution of the command or application.
Gets the output instance used by the last execution of the command or application.
Gets the status code returned by the last execution of the command or application.
Executes the command.
Details
string
getDisplay(bool $normalize = false)
Gets the display returned by the last execution of the command or application.
string
getErrorOutput(bool $normalize = false)
Gets the output written to STDERR by the application.
InputInterface
getInput()
Gets the input instance used by the last execution of the command or application.
OutputInterface
getOutput()
Gets the output instance used by the last execution of the command or application.
int
getStatusCode()
Gets the status code returned by the last execution of the command or application.
int
execute(array $input, array $options = array())
Executes the command.
Available execution options:
- interactive: Sets the input interactive flag
- decorated: Sets the output decorated flag
- verbosity: Sets the output verbosity flag
- capture_stderr_separately: Make output of stdOut and stdErr separately available