class Illuminate / Support / Testing / Fakes / NotificationFake

NotificationFake

Implements

Uses

Properties

protected

$notifications array

All of the notifications that have been sent.

Default: []
public

$locale string|null

Locale used when sending notifications.

Default: null

Methods

public

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
public

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
public

assertSentOnDemandTimes ( $notification , $times ) : void

Assert if a notification was sent on-demand a number of times.

Parameters

  • $notification string
  • $times int
public

assertSentToTimes ( $notifiable , $notification , $times ) : void

Assert if a notification was sent a number of times.

Parameters

  • $notifiable mixed
  • $notification string
  • $times int
public

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
public

assertNothingSent ( ) : void

Assert that no notifications were sent.

public

assertNothingSentTo ( $notifiable ) : void

Assert that no notifications were sent to the given notifiable.

Parameters

  • $notifiable mixed
public

assertSentTimes ( $notification , $expectedCount ) : void

Assert the total amount of times a notification was sent.

Parameters

  • $notification string
  • $expectedCount int
public

assertCount ( $expectedCount ) : void

Assert the total count of notification that were sent.

Parameters

  • $expectedCount int
public

sent ( $notifiable , $notification , $callback ) : Illuminate\...\Collection

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

Parameters

  • $notifiable mixed
  • $notification string
  • $callback callable|null
public

hasSent ( $notifiable , $notification ) : bool

Determine if there are more notifications left to inspect.

Parameters

  • $notifiable mixed
  • $notification string
protected

notificationsFor ( $notifiable , $notification ) : array

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

Parameters

  • $notifiable mixed
  • $notification string
public

send ( $notifiables , $notification ) : void

Send the given notification to the given notifiable entities.

Parameters

  • $notifiables Illuminate\...\Collection|array|mixed
  • $notification mixed
public

sendNow ( $notifiables , $notification , array $channels ) : void

Send the given notification immediately.

Parameters

  • $notifiables Illuminate\...\Collection|array|mixed
  • $notification mixed
  • $channels array|null
public

channel ( $name ) : mixed

Get a channel instance by name.

Parameters

  • $name string|null
public

locale ( $locale ) : $this

Set the locale of notifications.

Parameters

  • $locale string
public

sentNotifications ( ) : array

Get the notifications that have been sent.