NotificationFake
Implements
Uses
Properties
$notifications array
All of the notifications that have been sent.
$locale string|null
Locale used when sending notifications.
Methods
assertSentOnDemand ( $notification , $callback ) : void
Assert if a notification was sent on-demand based on a truth-test callback.
Parameters
- $notification string|Closure
- $callback callable|null
assertSentTo ( $notifiable , $notification , $callback ) : void
Assert if a notification was sent based on a truth-test callback.
Parameters
- $notifiable mixed
- $notification string|Closure
- $callback callable|null
assertSentOnDemandTimes ( $notification , $times ) : void
Assert if a notification was sent on-demand a number of times.
Parameters
- $notification string
- $times int
assertSentToTimes ( $notifiable , $notification , $times ) : void
Assert if a notification was sent a number of times.
Parameters
- $notifiable mixed
- $notification string
- $times int
assertNotSentTo ( $notifiable , $notification , $callback ) : void
Determine if a notification was sent based on a truth-test callback.
Parameters
- $notifiable mixed
- $notification string|Closure
- $callback callable|null
assertNothingSent ( ) : void
Assert that no notifications were sent.
assertNothingSentTo ( $notifiable ) : void
Assert that no notifications were sent to the given notifiable.
Parameters
- $notifiable mixed
assertSentTimes ( $notification , $expectedCount ) : void
Assert the total amount of times a notification was sent.
Parameters
- $notification string
- $expectedCount int
assertCount ( $expectedCount ) : void
Assert the total count of notification that were sent.
Parameters
- $expectedCount int
sent ( $notifiable , $notification , $callback ) : Illuminate\...\Collection
Get all of the notifications matching a truth-test callback.
Parameters
- $notifiable mixed
- $notification string
- $callback callable|null
hasSent ( $notifiable , $notification ) : bool
Determine if there are more notifications left to inspect.
Parameters
- $notifiable mixed
- $notification string
notificationsFor ( $notifiable , $notification ) : array
Get all of the notifications for a notifiable entity by type.
Parameters
- $notifiable mixed
- $notification string
send ( $notifiables , $notification ) : void
Send the given notification to the given notifiable entities.
Parameters
- $notifiables Illuminate\...\Collection|array|mixed
- $notification mixed
sendNow ( $notifiables , $notification , array $channels ) : void
Send the given notification immediately.
Parameters
- $notifiables Illuminate\...\Collection|array|mixed
- $notification mixed
- $channels array|null
channel ( $name ) : mixed
Get a channel instance by name.
Parameters
- $name string|null
locale ( $locale ) : $this
Set the locale of notifications.
Parameters
- $locale string
sentNotifications ( ) : array
Get the notifications that have been sent.