BusFake
class BusFake implements Dispatcher (View source)
Properties
protected array | $commands | The commands that have been dispatched. |
Methods
Assert if a job was dispatched based on a truth-test callback.
Assert if a job was pushed a number of times.
Determine if a job was dispatched based on a truth-test callback.
Get all of the jobs matching a truth-test callback.
Determine if there are any stored commands for a given class.
Dispatch a command to its appropriate handler.
Dispatch a command to its appropriate handler in the current process.
Set the pipes commands should be piped through before dispatching.
Details
void
assertDispatched(string $command, callable|int|null $callback = null)
Assert if a job was dispatched based on a truth-test callback.
protected void
assertDispatchedTimes(string $command, int $times = 1)
Assert if a job was pushed a number of times.
void
assertNotDispatched(string $command, callable|null $callback = null)
Determine if a job was dispatched based on a truth-test callback.
Collection
dispatched(string $command, callable|null $callback = null)
Get all of the jobs matching a truth-test callback.
bool
hasDispatched(string $command)
Determine if there are any stored commands for a given class.
mixed
dispatch(mixed $command)
Dispatch a command to its appropriate handler.
mixed
dispatchNow(mixed $command, mixed $handler = null)
Dispatch a command to its appropriate handler in the current process.
$this
pipeThrough(array $pipes)
Set the pipes commands should be piped through before dispatching.