class NotificationFake implements Factory

Properties

protected array $notifications

All of the notifications that have been sent.

Methods

void
assertSentTo(mixed $notifiable, string $notification, callable|null $callback = null)

Assert if a notification was sent based on a truth-test callback.

void
assertNotSentTo(mixed $notifiable, string $notification, callable|null $callback = null)

Determine if a notification was sent based on a truth-test callback.

sent(mixed $notifiable, string $notification, callable|null $callback = null)

Get all of the notifications matching a truth-test callback.

bool
hasSent(mixed $notifiable, string $notification)

Determine if there are more notifications left to inspect.

array
notificationsFor(mixed $notifiable, string $notification)

Get all of the notifications for a notifiable entity by type.

void
send(Collection|array|mixed $notifiables, mixed $notification)

Send the given notification to the given notifiable entities.

void
sendNow(Collection|array|mixed $notifiables, mixed $notification)

Send the given notification immediately.

mixed
channel(string|null $name = null)

Get a channel instance by name.

Details

at line 27
void assertSentTo(mixed $notifiable, string $notification, callable|null $callback = null)

Assert if a notification was sent based on a truth-test callback.

Parameters

mixed $notifiable
string $notification
callable|null $callback

Return Value

void

at line 51
void assertNotSentTo(mixed $notifiable, string $notification, callable|null $callback = null)

Determine if a notification was sent based on a truth-test callback.

Parameters

mixed $notifiable
string $notification
callable|null $callback

Return Value

void

at line 75
Collection sent(mixed $notifiable, string $notification, callable|null $callback = null)

Get all of the notifications matching a truth-test callback.

Parameters

mixed $notifiable
string $notification
callable|null $callback

Return Value

Collection

at line 99
bool hasSent(mixed $notifiable, string $notification)

Determine if there are more notifications left to inspect.

Parameters

mixed $notifiable
string $notification

Return Value

bool

at line 111
protected array notificationsFor(mixed $notifiable, string $notification)

Get all of the notifications for a notifiable entity by type.

Parameters

mixed $notifiable
string $notification

Return Value

array

at line 127
void send(Collection|array|mixed $notifiables, mixed $notification)

Send the given notification to the given notifiable entities.

Parameters

Collection|array|mixed $notifiables
mixed $notification

Return Value

void

at line 139
void sendNow(Collection|array|mixed $notifiables, mixed $notification)

Send the given notification immediately.

Parameters

Collection|array|mixed $notifiables
mixed $notification

Return Value

void

at line 161
mixed channel(string|null $name = null)

Get a channel instance by name.

Parameters

string|null $name

Return Value

mixed