Class

Symfony\Component\Console\Tester\ApplicationTester

class ApplicationTester

Eases the testing of console applications.

Methods

__construct(Application $application)

Constructor.

integer run(array $input, array $options = array())

Executes the application.

string getDisplay()

Gets the display returned by the last execution of the application.

InputInterface getInput()

Gets the input instance used by the last execution of the application.

OutputInterface getOutput()

Gets the output instance used by the last execution of the application.

Details

at line 34
public __construct(Application $application)

Constructor.

Parameters

Application $application An Application instance to test.

at line 53
public integer run(array $input, array $options = array())

Executes the application.

Available options:

Parameters

array $input An array of arguments and options
array $options An array of options

Return Value

integer The command exit code

at line 76
public string getDisplay()

Gets the display returned by the last execution of the application.

Return Value

string The display

at line 88
public InputInterface getInput()

Gets the input instance used by the last execution of the application.

Return Value

InputInterface The current input instance

at line 98
public OutputInterface getOutput()

Gets the output instance used by the last execution of the application.

Return Value

OutputInterface The current output instance