TesterTrait
Tags
Table of Contents
Methods
- assertCommandIsSuccessful() : void
- getDisplay() : string
- Gets the display returned by the last execution of the command or application.
- getErrorOutput() : string
- Gets the output written to STDERR by the application.
- getInput() : InputInterface
- Gets the input instance used by the last execution of the command or application.
- getOutput() : OutputInterface
- Gets the output instance used by the last execution of the command or application.
- getStatusCode() : int
- Gets the status code returned by the last execution of the command or application.
- setInputs() : $this
- Sets the user inputs.
Methods
assertCommandIsSuccessful()
public
assertCommandIsSuccessful([string $message = '' ]) : void
Parameters
- $message : string = ''
getDisplay()
Gets the display returned by the last execution of the command or application.
public
getDisplay([bool $normalize = false ]) : string
Parameters
- $normalize : bool = false
Tags
Return values
stringgetErrorOutput()
Gets the output written to STDERR by the application.
public
getErrorOutput([bool $normalize = false ]) : string
Parameters
- $normalize : bool = false
-
Whether to normalize end of lines to \n or not
Return values
stringgetInput()
Gets the input instance used by the last execution of the command or application.
public
getInput() : InputInterface
Return values
InputInterfacegetOutput()
Gets the output instance used by the last execution of the command or application.
public
getOutput() : OutputInterface
Return values
OutputInterfacegetStatusCode()
Gets the status code returned by the last execution of the command or application.
public
getStatusCode() : int
Tags
Return values
intsetInputs()
Sets the user inputs.
public
setInputs(array<string|int, mixed> $inputs) : $this
Parameters
- $inputs : array<string|int, mixed>
-
An array of strings representing each input passed to the command input stream