class Illuminate / Process / FakeInvokedProcess
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

FakeInvokedProcess

Implements

Properties

protected

$command string

The command being faked.

Default: null
protected

$process FakeProcessDescription

The underlying process description.

Default: null
protected

$receivedSignals array

The signals that have been received.

Default: []
protected

$remainingRunIterations int|null

The number of times the process should indicate that it is "running".

Default: null
protected

$outputHandler callable|null

The general output handler callback.

Default: null
protected

$nextOutputIndex int

The current output's index.

protected

$nextErrorOutputIndex int

The current error output's index.

Methods

public

__construct ( string $command , FakeProcessDescription $process ) : void

Create a new invoked process instance.

Parameters

public

id ( ) : int|null

Get the process ID if the process is still running.

public

signal ( int $signal ) : $this

Send a signal to the process.

Parameters

  • $signal int
public

hasReceivedSignal ( int $signal ) : bool

Determine if the process has received the given signal.

Parameters

  • $signal int
public

running ( ) : bool

Determine if the process is still running.

protected

invokeOutputHandlerWithNextLineOfOutput ( ) : array|false

Invoke the asynchronous output handler with the next single line of output if necessary.

public

output ( ) : string

Get the standard output for the process.

public

errorOutput ( ) : string

Get the error output for the process.

public

latestOutput ( ) : string

Get the latest standard output for the process.

public

latestErrorOutput ( ) : string

Get the latest error output for the process.

public

wait ( callable $output ) : ProcessResult

Wait for the process to finish.

Parameters

  • $output callable|null
public

predictProcessResult ( ) : ProcessResult

Get the ultimate process result that wil be returned by this "process".

public

withOutputHandler ( callable $outputHandler ) : $this

Set the general output handler for the fake invoked process.

Parameters

  • $output callable|null