FakeProcessDescription
class FakeProcessDescription (View source)
Properties
int|null | $processId | The process' ID. |
|
array | $output | All of the process' output in the order it was described. |
|
int | $exitCode | The process' exit code. |
|
int | $runIterations | The number of times the process should indicate that it is "running". |
Methods
Specify the process ID that should be assigned to the process.
Describe a line of standard output.
Describe a line of error output.
Replace the entire output buffer with the given string.
Replace the entire error output buffer with the given string.
Specify the process exit code.
Specify how many times the "isRunning" method should return "true".
Specify how many times the "isRunning" method should return "true".
Turn the fake process description into an actual process.
Convert the process description into a process result.
Resolve the standard output as a string.
Resolve the error output as a string.
Details
$this
id(int $processId)
Specify the process ID that should be assigned to the process.
$this
output(array|string $output)
Describe a line of standard output.
$this
errorOutput(array|string $output)
Describe a line of error output.
$this
replaceOutput(string $output)
Replace the entire output buffer with the given string.
$this
replaceErrorOutput(string $output)
Replace the entire error output buffer with the given string.
$this
exitCode(int $exitCode)
Specify the process exit code.
$this
iterations(int $iterations)
Specify how many times the "isRunning" method should return "true".
$this
runsFor(int $iterations)
Specify how many times the "isRunning" method should return "true".
Process
toSymfonyProcess(string $command)
Turn the fake process description into an actual process.
ProcessResult
toProcessResult(string $command)
Convert the process description into a process result.
protected string
resolveOutput()
Resolve the standard output as a string.
protected string
resolveErrorOutput()
Resolve the error output as a string.