platform/api/laravel/Support/Testing/Fakes/NotificationFake.yaml

350 lines
7.6 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: NotificationFake
class_comment: null
dependencies:
- name: Closure
type: class
source: Closure
- name: Exception
type: class
source: Exception
- name: NotificationDispatcher
type: class
source: Illuminate\Contracts\Notifications\Dispatcher
- name: NotificationFactory
type: class
source: Illuminate\Contracts\Notifications\Factory
- name: ShouldQueue
type: class
source: Illuminate\Contracts\Queue\ShouldQueue
- name: HasLocalePreference
type: class
source: Illuminate\Contracts\Translation\HasLocalePreference
- name: AnonymousNotifiable
type: class
source: Illuminate\Notifications\AnonymousNotifiable
- name: Collection
type: class
source: Illuminate\Support\Collection
- name: Str
type: class
source: Illuminate\Support\Str
- name: Macroable
type: class
source: Illuminate\Support\Traits\Macroable
- name: ReflectsClosures
type: class
source: Illuminate\Support\Traits\ReflectsClosures
- name: PHPUnit
type: class
source: PHPUnit\Framework\Assert
properties:
- name: notifications
visibility: protected
comment: '# * All of the notifications that have been sent.
# *
# * @var array'
- name: locale
visibility: public
comment: '# * Locale used when sending notifications.
# *
# * @var string|null'
- name: serializeAndRestore
visibility: protected
comment: '# * Indicates if notifications should be serialized and restored when
pushed to the queue.
# *
# * @var bool'
methods:
- name: assertSentOnDemand
visibility: public
parameters:
- name: notification
- name: callback
default: 'null'
comment: "# * All of the notifications that have been sent.\n# *\n# * @var array\n\
# */\n# protected $notifications = [];\n# \n# /**\n# * Locale used when sending\
\ notifications.\n# *\n# * @var string|null\n# */\n# public $locale;\n# \n# /**\n\
# * Indicates if notifications should be serialized and restored when pushed to\
\ the queue.\n# *\n# * @var bool\n# */\n# protected $serializeAndRestore = false;\n\
# \n# /**\n# * Assert if a notification was sent on-demand based on a truth-test\
\ callback.\n# *\n# * @param string|\\Closure $notification\n# * @param callable|null\
\ $callback\n# * @return void\n# *\n# * @throws \\Exception"
- name: assertSentTo
visibility: public
parameters:
- name: notifiable
- name: notification
- name: callback
default: 'null'
comment: '# * Assert if a notification was sent based on a truth-test callback.
# *
# * @param mixed $notifiable
# * @param string|\Closure $notification
# * @param callable|null $callback
# * @return void
# *
# * @throws \Exception'
- name: assertSentOnDemandTimes
visibility: public
parameters:
- name: notification
- name: times
default: '1'
comment: '# * Assert if a notification was sent on-demand a number of times.
# *
# * @param string $notification
# * @param int $times
# * @return void'
- name: assertSentToTimes
visibility: public
parameters:
- name: notifiable
- name: notification
- name: times
default: '1'
comment: '# * Assert if a notification was sent a number of times.
# *
# * @param mixed $notifiable
# * @param string $notification
# * @param int $times
# * @return void'
- name: assertNotSentTo
visibility: public
parameters:
- name: notifiable
- name: notification
- name: callback
default: 'null'
comment: '# * Determine if a notification was sent based on a truth-test callback.
# *
# * @param mixed $notifiable
# * @param string|\Closure $notification
# * @param callable|null $callback
# * @return void
# *
# * @throws \Exception'
- name: assertNothingSent
visibility: public
parameters: []
comment: '# * Assert that no notifications were sent.
# *
# * @return void'
- name: assertNothingSentTo
visibility: public
parameters:
- name: notifiable
comment: '# * Assert that no notifications were sent to the given notifiable.
# *
# * @param mixed $notifiable
# * @return void
# *
# * @throws \Exception'
- name: assertSentTimes
visibility: public
parameters:
- name: notification
- name: expectedCount
comment: '# * Assert the total amount of times a notification was sent.
# *
# * @param string $notification
# * @param int $expectedCount
# * @return void'
- name: assertCount
visibility: public
parameters:
- name: expectedCount
comment: '# * Assert the total count of notification that were sent.
# *
# * @param int $expectedCount
# * @return void'
- name: sent
visibility: public
parameters:
- name: notifiable
- name: notification
- name: callback
default: 'null'
comment: '# * Get all of the notifications matching a truth-test callback.
# *
# * @param mixed $notifiable
# * @param string $notification
# * @param callable|null $callback
# * @return \Illuminate\Support\Collection'
- name: hasSent
visibility: public
parameters:
- name: notifiable
- name: notification
comment: '# * Determine if there are more notifications left to inspect.
# *
# * @param mixed $notifiable
# * @param string $notification
# * @return bool'
- name: notificationsFor
visibility: protected
parameters:
- name: notifiable
- name: notification
comment: '# * Get all of the notifications for a notifiable entity by type.
# *
# * @param mixed $notifiable
# * @param string $notification
# * @return array'
- name: send
visibility: public
parameters:
- name: notifiables
- name: notification
comment: '# * Send the given notification to the given notifiable entities.
# *
# * @param \Illuminate\Support\Collection|array|mixed $notifiables
# * @param mixed $notification
# * @return void'
- name: sendNow
visibility: public
parameters:
- name: notifiables
- name: notification
- name: channels
default: 'null'
comment: '# * Send the given notification immediately.
# *
# * @param \Illuminate\Support\Collection|array|mixed $notifiables
# * @param mixed $notification
# * @param array|null $channels
# * @return void'
- name: channel
visibility: public
parameters:
- name: name
default: 'null'
comment: '# * Get a channel instance by name.
# *
# * @param string|null $name
# * @return mixed'
- name: locale
visibility: public
parameters:
- name: locale
comment: '# * Set the locale of notifications.
# *
# * @param string $locale
# * @return $this'
- name: serializeAndRestore
visibility: public
parameters:
- name: serializeAndRestore
default: 'true'
comment: '# * Specify if notification should be serialized and restored when being
"pushed" to the queue.
# *
# * @param bool $serializeAndRestore
# * @return $this'
- name: serializeAndRestoreNotification
visibility: protected
parameters:
- name: notification
comment: '# * Serialize and unserialize the notification to simulate the queueing
process.
# *
# * @param mixed $notification
# * @return mixed'
- name: sentNotifications
visibility: public
parameters: []
comment: '# * Get the notifications that have been sent.
# *
# * @return array'
traits:
- Closure
- Exception
- Illuminate\Contracts\Queue\ShouldQueue
- Illuminate\Contracts\Translation\HasLocalePreference
- Illuminate\Notifications\AnonymousNotifiable
- Illuminate\Support\Collection
- Illuminate\Support\Str
- Illuminate\Support\Traits\Macroable
- Illuminate\Support\Traits\ReflectsClosures
- Macroable
interfaces:
- Fake