MocksApplicationServices
trait MocksApplicationServices
Properties
| protected array | $firedEvents | All of the fired events. |
Methods
Specify a list of events that should be fired for the given operation.
Specify a list of events that should not be fired for the given operation.
Mock the event dispatcher so all events are silenced and collected.
Filter the given events against the fired events.
Filter the given classes against an array of dispatched classes.
Check if the given class exists in an array of dispatched classes.
Details
at line 32
$this
expectsEvents(array|string $events)
Specify a list of events that should be fired for the given operation.
These events will be mocked, so that handlers will not actually be executed.
at line 58
$this
doesntExpectEvents(array|string $events)
Specify a list of events that should not be fired for the given operation.
These events will be mocked, so that handlers will not actually be executed.
at line 79
protected $this
withoutEvents()
Mock the event dispatcher so all events are silenced and collected.
at line 103
protected array
getFiredEvents(array $events)
Filter the given events against the fired events.
at line 113
protected array
getDispatched(array $classes, array $dispatched)
Filter the given classes against an array of dispatched classes.
at line 126
protected bool
wasDispatched(string $needle, array $haystack)
Check if the given class exists in an array of dispatched classes.