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);
- author Fabien Potencier
CloneableInstantiable
| Methods |
| public __construct(Symfony |
| public assertCommandIsSuccessful(string $message = '') : void |
| public getDisplay(bool $normalize = false) : string Gets the display returned by the last execution of the command or application.
|
| public getErrorOutput(bool $normalize = false) : string Gets the output written to STDERR by the application.
|
| public getInput() : Symfony Gets the input instance used by the last execution of the command or application. |
| public getOutput() : Symfony Gets the output instance used by the last execution of the command or application. |
| public getStatusCode() : int Gets the status code returned by the last execution of the command or application.
|
| public run(array $input, array $options = []) : int Executes the application. Available options:
|
| public setInputs(array $inputs) : static Sets the user inputs.
|
| Properties |
| private Symfony |
| private bool $captureStreamsIndependently = false |
| private Symfony |
| private array $inputs = [] |
| private Symfony |
| private int $statusCode |
| Methods |
private static createStream(array $inputs)
|
| private initOutput(array $options) : void Initializes the output property. Available options:
|
| Methods |
private static createStream(array $inputs)
|