Documentation

NotificationFake
in package
implements Factory, Dispatcher

Interfaces, Classes and Traits

Factory
Dispatcher

Table of Contents

$notifications  : array<string|int, mixed>
All of the notifications that have been sent.
assertNothingSent()  : void
Assert that no notifications were sent.
assertNotSentTo()  : void
Determine if a notification was sent based on a truth-test callback.
assertSentTo()  : void
Assert if a notification was sent based on a truth-test callback.
assertSentToTimes()  : void
Assert if a notification was sent a number of times.
channel()  : mixed
Get a channel instance by name.
hasSent()  : bool
Determine if there are more notifications left to inspect.
send()  : void
Send the given notification to the given notifiable entities.
sendNow()  : void
Send the given notification immediately.
sent()  : Collection
Get all of the notifications matching a truth-test callback.
notificationsFor()  : array<string|int, mixed>
Get all of the notifications for a notifiable entity by type.

Properties

$notifications

All of the notifications that have been sent.

protected array<string|int, mixed> $notifications = []

Methods

assertNothingSent()

Assert that no notifications were sent.

public assertNothingSent() : void
Return values
void

assertNotSentTo()

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

public assertNotSentTo(mixed $notifiable, string $notification[, callable|null $callback = null ]) : void
Parameters
$notifiable : mixed
$notification : string
$callback : callable|null = null
Return values
void

assertSentTo()

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

public assertSentTo(mixed $notifiable, string $notification[, callable|null $callback = null ]) : void
Parameters
$notifiable : mixed
$notification : string
$callback : callable|null = null
Return values
void

assertSentToTimes()

Assert if a notification was sent a number of times.

public assertSentToTimes(mixed $notifiable, string $notification[, int $times = 1 ]) : void
Parameters
$notifiable : mixed
$notification : string
$times : int = 1
Return values
void

channel()

Get a channel instance by name.

public channel([string|null $name = null ]) : mixed
Parameters
$name : string|null = null
Return values
mixed

hasSent()

Determine if there are more notifications left to inspect.

public hasSent(mixed $notifiable, string $notification) : bool
Parameters
$notifiable : mixed
$notification : string
Return values
bool

send()

Send the given notification to the given notifiable entities.

public send(Collection|array<string|int, mixed>|mixed $notifiables, mixed $notification) : void
Parameters
$notifiables : Collection|array<string|int, mixed>|mixed
$notification : mixed
Return values
void

sendNow()

Send the given notification immediately.

public sendNow(Collection|array<string|int, mixed>|mixed $notifiables, mixed $notification) : void
Parameters
$notifiables : Collection|array<string|int, mixed>|mixed
$notification : mixed
Return values
void

sent()

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

public sent(mixed $notifiable, string $notification[, callable|null $callback = null ]) : Collection
Parameters
$notifiable : mixed
$notification : string
$callback : callable|null = null
Return values
Collection

notificationsFor()

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

protected notificationsFor(mixed $notifiable, string $notification) : array<string|int, mixed>
Parameters
$notifiable : mixed
$notification : string
Return values
array<string|int, mixed>

Search results