FakeProcessSequence
class FakeProcessSequence
Properties
| protected bool | $failWhenEmpty | Indicates that invoking this sequence when it is empty should throw an exception. |
|
| protected FakeProcessDescription|ProcessResult|null | $emptyProcess | The response that should be returned when the sequence is empty. |
Methods
Create a new fake process sequence instance.
Push a new process result or description onto the sequence.
Make the sequence return a default result when it is empty.
Convert the given result into an actual process result or description.
Make the sequence return a default result when it is empty.
Indicate that this sequence has depleted all of its process results.
Get the next process in the sequence.
Details
at line 30
__construct(array $processes = [])
Create a new fake process sequence instance.
at line 40
FakeProcessSequence
push(array|FakeProcessDescription|ProcessResult|string $process)
Push a new process result or description onto the sequence.
at line 50
FakeProcessSequence
whenEmpty(array|FakeProcessDescription|ProcessResult|string $process)
Make the sequence return a default result when it is empty.
at line 61
protected FakeProcessDescription|ProcessResult
toProcessResult(array|FakeProcessDescription|ProcessResult|string $process)
Convert the given result into an actual process result or description.
at line 71
FakeProcessSequence
dontFailWhenEmpty()
Make the sequence return a default result when it is empty.
at line 79
bool
isEmpty()
Indicate that this sequence has depleted all of its process results.
at line 89
FakeProcessDescription|ProcessResult
__invoke()
Get the next process in the sequence.