NotificationFake
class NotificationFake implements Factory, Dispatcher (View source)
Properties
protected array | $notifications | All of the notifications that have been sent. |
Methods
Assert if a notification was sent based on a truth-test callback.
Assert if a notification was sent a number of times.
Determine if a notification was sent based on a truth-test callback.
Assert that no notifications were sent.
Assert the total amount of times a notification was sent.
Get all of the notifications matching a truth-test callback.
Determine if there are more notifications left to inspect.
Get all of the notifications for a notifiable entity by type.
Send the given notification to the given notifiable entities.
Send the given notification immediately.
Get a channel instance by name.
Details
at line 28
void
assertSentTo(mixed $notifiable, string $notification, callable|null $callback = null)
Assert if a notification was sent based on a truth-test callback.
at line 56
void
assertSentToTimes(mixed $notifiable, string $notification, int $times = 1)
Assert if a notification was sent a number of times.
at line 72
void
assertNotSentTo(mixed $notifiable, string $notification, callable|null $callback = null)
Determine if a notification was sent based on a truth-test callback.
at line 93
void
assertNothingSent()
Assert that no notifications were sent.
at line 105
void
assertTimesSent(int $expectedCount, string $notification)
Assert the total amount of times a notification was sent.
at line 127
Collection
sent(mixed $notifiable, string $notification, callable|null $callback = null)
Get all of the notifications matching a truth-test callback.
at line 151
bool
hasSent(mixed $notifiable, string $notification)
Determine if there are more notifications left to inspect.
at line 163
protected array
notificationsFor(mixed $notifiable, string $notification)
Get all of the notifications for a notifiable entity by type.
at line 179
void
send(Collection|array|mixed $notifiables, mixed $notification)
Send the given notification to the given notifiable entities.
at line 191
void
sendNow(Collection|array|mixed $notifiables, mixed $notification)
Send the given notification immediately.
at line 216
mixed
channel(string|null $name = null)
Get a channel instance by name.