BusFake

BusFake class BusFake implements Dispatcher (View source) Methods void assertDispatched(string $command, callable|null $callback = null) Assert if a job was dispatched based on a truth-test callback. 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 hasDispatc

BusFake::dispatch()

mixed dispatch(mixed $command) Dispatch a command to its appropriate handler. Parameters mixed $command Return Value mixed

BusFake::dispatched()

Collection dispatched(string $command, callable|null $callback = null) Get all of the jobs matching a truth-test callback. Parameters string $command callable|null $callback Return Value Collection

BusFake::assertDispatched()

void assertDispatched(string $command, callable|null $callback = null) Assert if a job was dispatched based on a truth-test callback. Parameters string $command callable|null $callback Return Value void

BusFake::dispatchNow()

mixed dispatchNow(mixed $command, mixed $handler = null) Dispatch a command to its appropriate handler in the current process. Parameters mixed $command mixed $handler Return Value mixed

BusFake::assertNotDispatched()

void assertNotDispatched(string $command, callable|null $callback = null) Determine if a job was dispatched based on a truth-test callback. Parameters string $command callable|null $callback Return Value void

Bus::spy()

static void spy() Convert the facade into a Mockery spy. Return Value void

Bus::swap()

static void swap(mixed $instance) Hotswap the underlying instance behind the facade. Parameters mixed $instance Return Value void

Bus::__callStatic()

static mixed __callStatic(string $method, array $args) Handle dynamic, static calls to the object. Parameters string $method array $args Return Value mixed Exceptions RuntimeException

Bus::shouldReceive()

static Expectation shouldReceive() Initiate a mock expectation on the facade. Return Value Expectation