class
Illuminate
/
Process
/
FakeProcessSequence
FakeProcessSequence
Properties
protected
$processes array
The fake process results and descriptions.
Default: []
protected
$failWhenEmpty bool
Indicates that invoking this sequence when it is empty should throw an exception.
Default: true
protected
$emptyProcess ProcessResult |FakeProcessDescription
The response that should be returned when the sequence is empty.
Default: null
Methods
public
__construct ( array $processes ) : void
Create a new fake process sequence instance.
Parameters
- $processes array
public
push ( $process ) : $this
Push a new process result or description onto the sequence.
Parameters
- $process ProcessResult |FakeProcessDescription |array|string
public
whenEmpty ( $process ) : $this
Make the sequence return a default result when it is empty.
Parameters
- $process ProcessResult |FakeProcessDescription |array|string
protected
toProcessResult ( $process ) : ProcessResult |FakeProcessDescription
Convert the given result into an actual process result or description.
Parameters
- $process ProcessResult |FakeProcessDescription |array|string
public
dontFailWhenEmpty ( ) : $this
Make the sequence return a default result when it is empty.
public
isEmpty ( ) : bool
Indicate that this sequence has depleted all of its process results.