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

$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.

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

$this id(int $processId)

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

Parameters

int $processId

Return Value

$this

$this output(array|string $output)

Describe a line of standard output.

Parameters

array|string $output

Return Value

$this

$this errorOutput(array|string $output)

Describe a line of error output.

Parameters

array|string $output

Return Value

$this

$this replaceOutput(string $output)

Replace the entire output buffer with the given string.

Parameters

string $output

Return Value

$this

$this replaceErrorOutput(string $output)

Replace the entire error output buffer with the given string.

Parameters

string $output

Return Value

$this

$this exitCode(int $exitCode)

Specify the process exit code.

Parameters

int $exitCode

Return Value

$this

$this iterations(int $iterations)

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

Parameters

int $iterations

Return Value

$this

$this runsFor(int $iterations)

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

Parameters

int $iterations

Return Value

$this

Process toSymfonyProcess(string $command)

Turn the fake process description into an actual process.

Parameters

string $command

Return Value

Process

ProcessResult toProcessResult(string $command)

Convert the process description into a process result.

Parameters

string $command

Return Value

ProcessResult

protected string resolveOutput()

Resolve the standard output as a string.

Return Value

string

protected string resolveErrorOutput()

Resolve the error output as a string.

Return Value

string

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.