ProcessResult
class ProcessResult implements ProcessResult
Methods
Create a new process result instance.
Get the original command executed by the process.
Determine if the process was successful.
Determine if the process failed.
Get the exit code of the process.
Get the standard output of the process.
Determine if the output contains the given string.
Get the error output of the process.
Determine if the error output contains the given string.
Throw an exception if the process failed.
Throw an exception if the process failed and the given condition is true.
Details
at line 18
__construct(Process $process)
Create a new process result instance.
at line 25
string
command()
Get the original command executed by the process.
at line 33
bool
successful()
Determine if the process was successful.
at line 41
bool
failed()
Determine if the process failed.
at line 49
int|null
exitCode()
Get the exit code of the process.
at line 57
string
output()
Get the standard output of the process.
at line 65
bool
seeInOutput(string $output)
Determine if the output contains the given string.
at line 73
string
errorOutput()
Get the error output of the process.
at line 81
bool
seeInErrorOutput(string $output)
Determine if the error output contains the given string.
at line 91
ProcessResult
throw(callable|null $callback = null)
Throw an exception if the process failed.
at line 111
ProcessResult
throwIf(bool $condition, callable|null $callback = null)
Throw an exception if the process failed and the given condition is true.