Class CommandTester
Eases the testing of console commands.
Methods summary
public
|
|
public
integer
|
#
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
Parameters
- $input
- An array of command arguments and options
- $options
- An array of execution options
Returns
integer The command exit code
|
public
string
|
#
getDisplay( boolean $normalize = false )
Gets the display returned by the last execution of the command.
Gets the display returned by the last execution of the command.
Parameters
- $normalize
- Whether to normalize end of lines to \n or not
Returns
string The display
|
public
Symfony\Component\Console\Input\InputInterface
|
#
getInput( )
Gets the input instance used by the last execution of the command.
Gets the input instance used by the last execution of the command.
Returns
|
public
Symfony\Component\Console\Output\OutputInterface
|
#
getOutput( )
Gets the output instance used by the last execution of the command.
Gets the output instance used by the last execution of the command.
Returns
|
public
integer
|
#
getStatusCode( )
Gets the status code returned by the last execution of the application.
Gets the status code returned by the last execution of the application.
Returns
integer The status code
|