Class ApplicationTester
Eases the testing of console applications.
When testing an application, don't forget to disable the auto exit flag:
$application = new Application(); $application->setAutoExit(false);
Methods summary
public
|
|
public
integer
|
#
run( array $input, array $options = array() )
Executes the application.
Executes the application.
Available options:
* interactive: Sets the input interactive flag * decorated: Sets the output decorated flag * verbosity: Sets the output verbosity flag
Parameters
- $input
- An array of arguments and options
- $options
- An array of options
Returns
integer The command exit code
|
public
string
|
#
getDisplay( boolean $normalize = false )
Gets the display returned by the last execution of the application.
Gets the display returned by the last execution of the application.
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 application.
Gets the input instance used by the last execution of the application.
Returns
|
public
Symfony\Component\Console\Output\OutputInterface
|
#
getOutput( )
Gets the output instance used by the last execution of the application.
Gets the output instance used by the last execution of the application.
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
|