ApplicationTester
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
Executes the application.
Gets the display returned by the last execution of the application.
Gets the input instance used by the last execution of the application.
Gets the output instance used by the last execution of the application.
Gets the status code returned by the last execution of the application.
Details
at line line 42
__construct(Application $application)
Constructor.
at line line 61
int
run(array $input, array $options = array())
Executes the application.
Available options:
- interactive: Sets the input interactive flag
- decorated: Sets the output decorated flag
- verbosity: Sets the output verbosity flag
at line line 86
string
getDisplay(bool $normalize = false)
Gets the display returned by the last execution of the application.
at line line 104
InputInterface
getInput()
Gets the input instance used by the last execution of the application.
at line line 114
OutputInterface
getOutput()
Gets the output instance used by the last execution of the application.
at line line 124
int
getStatusCode()
Gets the status code returned by the last execution of the application.