class EventFake implements Dispatcher (View source)
void | assertDispatched(string $event, callable|null $callback = null) Assert if an event was dispatched based on a truth-test callback. | |
void | assertNotDispatched(string $event, callable|null $callback = null) Determine if an event was dispatched based on a truth-test callback. | |
Collection | dispatched(string $event, callable|null $callback = null) Get all of the events matching a truth-test callback. | |
bool | hasDispatched(string $event) Determine if the given event has been dispatched. | |
void | listen(string|array $events, mixed $listener) Register an event listener with the dispatcher. | |
bool | hasListeners(string $eventName) Determine if a given event has listeners. | |
void | push(string $event, array $payload = array()) Register an event and payload to be dispatched later. | |
void | subscribe(object|string $subscriber) Register an event subscriber with the dispatcher. | |
void | flush(string $event) Flush a set of pushed events. | |
array|null | fire(string|object $event, mixed $payload = array(), bool $halt = false) Fire an event and call the listeners. | |
array|null | dispatch(string|object $event, mixed $payload = array(), bool $halt = false) Fire an event and call the listeners. | |
void | forget(string $event) Remove a set of listeners from the dispatcher. | |
void | forgetPushed() Forget all of the queued listeners. | |
array|null | until(string|object $event, mixed $payload = array()) Dispatch an event and call the listeners. |
Assert if an event was dispatched based on a truth-test callback.
Determine if an event was dispatched based on a truth-test callback.
Get all of the events matching a truth-test callback.
Determine if the given event has been dispatched.
Register an event listener with the dispatcher.
Determine if a given event has listeners.
Register an event and payload to be dispatched later.
Register an event subscriber with the dispatcher.
Flush a set of pushed events.
Fire an event and call the listeners.
Fire an event and call the listeners.
Remove a set of listeners from the dispatcher.
Forget all of the queued listeners.
Dispatch an event and call the listeners.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Support/Testing/Fakes/EventFake.html