Spec-Zone.ru › Laravel 5.7

NotificationFake

class NotificationFake implements Factory, Dispatcher (View source)

Свойства

protected array $notifications Все уведомления, которые были отправлены.
string|null $locale Язык, используемый при отправке уведомлений.

Методы

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

Проверить, было ли отправлено уведомление, основываясь на логической проверке обратного вызова.

void assertSentToTimes(mixed $notifiable, string $notification, int $times = 1)

Проверить, было ли отправлено уведомление определенное количество раз.

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

Определить, было ли отправлено уведомление, основываясь на логической проверке обратного вызова.

void assertNothingSent()

Проверить, что уведомления не были отправлены.

void assertTimesSent(int $expectedCount, string $notification)

Проверить общее количество отправленных уведомлений.

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

Получить все уведомления, соответствующие логической проверке обратного вызова.

bool hasSent(mixed $notifiable, string $notification)

Определить, есть ли еще уведомления для проверки.

array notificationsFor(mixed $notifiable, string $notification)

Получить все уведомления для сущности notifiable по типу.

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

Отправить заданное уведомление заданным сущностям notifiable.

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

Отправить заданное уведомление немедленно.

mixed channel(string|null $name = null)

Получить экземпляр канала по имени.

$this locale(string $locale)

Установить язык уведомлений.

Подробности

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

Проверить, было ли отправлено уведомление, основываясь на логической проверке обратного вызова.

Параметры

mixed $notifiable
string $notification
callable|null $callback

Возвращаемое значение

void

void assertSentToTimes(mixed $notifiable, string $notification, int $times = 1)

Проверить, было ли отправлено уведомление определенное количество раз.

Параметры

mixed $notifiable
string $notification
int $times

Возвращаемое значение

void

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

Определить, было ли отправлено уведомление, основываясь на логической проверке обратного вызова.

Параметры

mixed $notifiable
string $notification
callable|null $callback

Возвращаемое значение

void

void assertNothingSent()

Проверить, что уведомления не были отправлены.

Возвращаемое значение

void

void assertTimesSent(int $expectedCount, string $notification)

Проверить общее количество отправленных уведомлений.

Параметры

int $expectedCount
string $notification

Возвращаемое значение

void

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

Получить все уведомления, соответствующие логической проверке обратного вызова.

Параметры

mixed $notifiable
string $notification
callable|null $callback

Возвращаемое значение

Collection

bool hasSent(mixed $notifiable, string $notification)

Определить, есть ли еще уведомления для проверки.

Параметры

mixed $notifiable
string $notification

Возвращаемое значение

bool

protected array notificationsFor(mixed $notifiable, string $notification)

Получить все уведомления для сущности notifiable по типу.

Параметры

mixed $notifiable
string $notification

Возвращаемое значение

array

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

Отправить заданное уведомление заданным сущностям notifiable.

Параметры

Collection|array|mixed $notifiables
mixed $notification

Возвращаемое значение

void

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

Отправить заданное уведомление немедленно.

Параметры

Collection|array|mixed $notifiables
mixed $notification

Возвращаемое значение

void

mixed channel(string|null $name = null)

Получить экземпляр канала по имени.

Параметры

string|null $name

Возвращаемое значение

mixed

$this locale(string $locale)

Установить язык уведомлений.

Параметры

string $locale

Значение результата

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Support/Testing/Fakes/NotificationFake.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API