class FakeProcessDescription

Properties

int|null $processId

The process' ID.

array<int, array<string, string>> $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

id(int $processId)

Specify the process ID that should be assigned to the process.

output(array|string $output)

Describe a line of standard output.

errorOutput(array|string $output)

Describe a line of error output.

replaceOutput(string $output)

Replace the entire output buffer with the given string.

replaceErrorOutput(string $output)

Replace the entire error output buffer with the given string.

exitCode(int $exitCode)

Specify the process exit code.

iterations(int $iterations)

Specify how many times the "isRunning" method should return "true".

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.

toProcessResult(string $command)

Convert the process description into a process result.

string
resolveOutput()

Resolve the standard output as a string.

string
resolveErrorOutput()

Resolve the error output as a string.

Details

at line 38
FakeProcessDescription id(int $processId)

Specify the process ID that should be assigned to the process.

Parameters

int $processId

Return Value

FakeProcessDescription

at line 48
FakeProcessDescription output(array|string $output)

Describe a line of standard output.

Parameters

array|string $output

Return Value

FakeProcessDescription

at line 64
FakeProcessDescription errorOutput(array|string $output)

Describe a line of error output.

Parameters

array|string $output

Return Value

FakeProcessDescription

at line 80
FakeProcessDescription replaceOutput(string $output)

Replace the entire output buffer with the given string.

Parameters

string $output

Return Value

FakeProcessDescription

at line 99
FakeProcessDescription replaceErrorOutput(string $output)

Replace the entire error output buffer with the given string.

Parameters

string $output

Return Value

FakeProcessDescription

at line 118
FakeProcessDescription exitCode(int $exitCode)

Specify the process exit code.

Parameters

int $exitCode

Return Value

FakeProcessDescription

at line 128
FakeProcessDescription iterations(int $iterations)

Specify how many times the "isRunning" method should return "true".

Parameters

int $iterations

Return Value

FakeProcessDescription

at line 136
FakeProcessDescription runsFor(int $iterations)

Specify how many times the "isRunning" method should return "true".

Parameters

int $iterations

Return Value

FakeProcessDescription

at line 146
Process toSymfonyProcess(string $command)

Turn the fake process description into an actual process.

Parameters

string $command

Return Value

Process

at line 154
ProcessResult toProcessResult(string $command)

Convert the process description into a process result.

Parameters

string $command

Return Value

ProcessResult

at line 167
protected string resolveOutput()

Resolve the standard output as a string.

Return Value

string

at line 180
protected string resolveErrorOutput()

Resolve the error output as a string.

Return Value

string