\Symfony\Component\Console\TesterApplicationTester

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);

Summary

Methods
Properties
Constants
__construct()
run()
getErrorOutput()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$application
$input
$statusCode
$captureStreamsIndependently
N/A

Properties

$application

$application : 

Type

$input

$input : 

Type

$statusCode

$statusCode : 

Type

$captureStreamsIndependently

$captureStreamsIndependently : 

Type

Methods

run()

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

Executes the application.

Available 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

Parameters

array $input

An array of arguments and options

array $options

An array of options

Returns

integer —

The command exit code

getErrorOutput()

getErrorOutput(boolean  $normalize = false) : string

Gets the output written to STDERR by the application.

Parameters

boolean $normalize

Whether to normalize end of lines to \n or not

Returns

string