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

507 lines
10 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: MailFake
class_comment: null
dependencies:
- name: Closure
type: class
source: Closure
- name: Factory
type: class
source: Illuminate\Contracts\Mail\Factory
- name: Mailable
type: class
source: Illuminate\Contracts\Mail\Mailable
- name: Mailer
type: class
source: Illuminate\Contracts\Mail\Mailer
- name: MailQueue
type: class
source: Illuminate\Contracts\Mail\MailQueue
- name: ShouldQueue
type: class
source: Illuminate\Contracts\Queue\ShouldQueue
- name: MailManager
type: class
source: Illuminate\Mail\MailManager
- name: ForwardsCalls
type: class
source: Illuminate\Support\Traits\ForwardsCalls
- name: ReflectsClosures
type: class
source: Illuminate\Support\Traits\ReflectsClosures
- name: PHPUnit
type: class
source: PHPUnit\Framework\Assert
properties:
- name: manager
visibility: public
comment: '# * The mailer instance.
# *
# * @var MailManager'
- name: currentMailer
visibility: protected
comment: '# * The mailer currently being used to send a message.
# *
# * @var string'
- name: mailables
visibility: protected
comment: '# * All of the mailables that have been sent.
# *
# * @var array'
- name: queuedMailables
visibility: protected
comment: '# * All of the mailables that have been queued.
# *
# * @var array'
methods:
- name: __construct
visibility: public
parameters:
- name: manager
comment: "# * The mailer instance.\n# *\n# * @var MailManager\n# */\n# public $manager;\n\
# \n# /**\n# * The mailer currently being used to send a message.\n# *\n# * @var\
\ string\n# */\n# protected $currentMailer;\n# \n# /**\n# * All of the mailables\
\ that have been sent.\n# *\n# * @var array\n# */\n# protected $mailables = [];\n\
# \n# /**\n# * All of the mailables that have been queued.\n# *\n# * @var array\n\
# */\n# protected $queuedMailables = [];\n# \n# /**\n# * Create a new mail fake.\n\
# *\n# * @param MailManager $manager\n# * @return void"
- name: assertSent
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Assert if a mailable was sent based on a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|int|null $callback
# * @return void'
- name: assertSentTimes
visibility: protected
parameters:
- name: mailable
- name: times
default: '1'
comment: '# * Assert if a mailable was sent a number of times.
# *
# * @param string $mailable
# * @param int $times
# * @return void'
- name: assertNotOutgoing
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Determine if a mailable was not sent or queued to be sent based on
a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|null $callback
# * @return void'
- name: assertNotSent
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Determine if a mailable was not sent based on a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|null $callback
# * @return void'
- name: assertNothingOutgoing
visibility: public
parameters: []
comment: '# * Assert that no mailables were sent or queued to be sent.
# *
# * @return void'
- name: assertNothingSent
visibility: public
parameters: []
comment: '# * Assert that no mailables were sent.
# *
# * @return void'
- name: assertQueued
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Assert if a mailable was queued based on a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|int|null $callback
# * @return void'
- name: assertQueuedTimes
visibility: protected
parameters:
- name: mailable
- name: times
default: '1'
comment: '# * Assert if a mailable was queued a number of times.
# *
# * @param string $mailable
# * @param int $times
# * @return void'
- name: assertNotQueued
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Determine if a mailable was not queued based on a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|null $callback
# * @return void'
- name: assertNothingQueued
visibility: public
parameters: []
comment: '# * Assert that no mailables were queued.
# *
# * @return void'
- name: assertSentCount
visibility: public
parameters:
- name: count
comment: '# * Assert the total number of mailables that were sent.
# *
# * @param int $count
# * @return void'
- name: assertQueuedCount
visibility: public
parameters:
- name: count
comment: '# * Assert the total number of mailables that were queued.
# *
# * @param int $count
# * @return void'
- name: assertOutgoingCount
visibility: public
parameters:
- name: count
comment: '# * Assert the total number of mailables that were sent or queued.
# *
# * @param int $count
# * @return void'
- name: sent
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Get all of the mailables matching a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|null $callback
# * @return \Illuminate\Support\Collection'
- name: hasSent
visibility: public
parameters:
- name: mailable
comment: '# * Determine if the given mailable has been sent.
# *
# * @param string $mailable
# * @return bool'
- name: queued
visibility: public
parameters:
- name: mailable
- name: callback
default: 'null'
comment: '# * Get all of the queued mailables matching a truth-test callback.
# *
# * @param string|\Closure $mailable
# * @param callable|null $callback
# * @return \Illuminate\Support\Collection'
- name: hasQueued
visibility: public
parameters:
- name: mailable
comment: '# * Determine if the given mailable has been queued.
# *
# * @param string $mailable
# * @return bool'
- name: mailablesOf
visibility: protected
parameters:
- name: type
comment: '# * Get all of the mailed mailables for a given type.
# *
# * @param string $type
# * @return \Illuminate\Support\Collection'
- name: queuedMailablesOf
visibility: protected
parameters:
- name: type
comment: '# * Get all of the mailed mailables for a given type.
# *
# * @param string $type
# * @return \Illuminate\Support\Collection'
- name: mailer
visibility: public
parameters:
- name: name
default: 'null'
comment: '# * Get a mailer instance by name.
# *
# * @param string|null $name
# * @return \Illuminate\Contracts\Mail\Mailer'
- name: to
visibility: public
parameters:
- name: users
comment: '# * Begin the process of mailing a mailable class instance.
# *
# * @param mixed $users
# * @return \Illuminate\Mail\PendingMail'
- name: cc
visibility: public
parameters:
- name: users
comment: '# * Begin the process of mailing a mailable class instance.
# *
# * @param mixed $users
# * @return \Illuminate\Mail\PendingMail'
- name: bcc
visibility: public
parameters:
- name: users
comment: '# * Begin the process of mailing a mailable class instance.
# *
# * @param mixed $users
# * @return \Illuminate\Mail\PendingMail'
- name: raw
visibility: public
parameters:
- name: text
- name: callback
comment: '# * Send a new message with only a raw text part.
# *
# * @param string $text
# * @param \Closure|string $callback
# * @return void'
- name: send
visibility: public
parameters:
- name: view
- name: data
default: '[]'
- name: callback
default: 'null'
comment: '# * Send a new message using a view.
# *
# * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
# * @param array $data
# * @param \Closure|string|null $callback
# * @return mixed|void'
- name: sendNow
visibility: public
parameters:
- name: mailable
- name: data
default: '[]'
- name: callback
default: 'null'
comment: '# * Send a new message synchronously using a view.
# *
# * @param \Illuminate\Contracts\Mail\Mailable|string|array $mailable
# * @param array $data
# * @param \Closure|string|null $callback
# * @return void'
- name: sendMail
visibility: protected
parameters:
- name: view
- name: shouldQueue
default: 'false'
comment: '# * Send a new message using a view.
# *
# * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
# * @param bool $shouldQueue
# * @return mixed|void'
- name: queue
visibility: public
parameters:
- name: view
- name: queue
default: 'null'
comment: '# * Queue a new message for sending.
# *
# * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
# * @param string|null $queue
# * @return mixed'
- name: later
visibility: public
parameters:
- name: delay
- name: view
- name: queue
default: 'null'
comment: '# * Queue a new e-mail message for sending after (n) seconds.
# *
# * @param \DateTimeInterface|\DateInterval|int $delay
# * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
# * @param string|null $queue
# * @return mixed'
- name: prepareMailableAndCallback
visibility: protected
parameters:
- name: mailable
- name: callback
comment: '# * Infer mailable class using reflection if a typehinted closure is passed
to assertion.
# *
# * @param string|\Closure $mailable
# * @param callable|null $callback
# * @return array'
- name: forgetMailers
visibility: public
parameters: []
comment: '# * Forget all of the resolved mailer instances.
# *
# * @return $this'
- name: __call
visibility: public
parameters:
- name: method
- name: parameters
comment: '# * Handle dynamic method calls to the mailer.
# *
# * @param string $method
# * @param array $parameters
# * @return mixed'
traits:
- Closure
- Illuminate\Contracts\Mail\Factory
- Illuminate\Contracts\Mail\Mailable
- Illuminate\Contracts\Mail\Mailer
- Illuminate\Contracts\Mail\MailQueue
- Illuminate\Contracts\Queue\ShouldQueue
- Illuminate\Mail\MailManager
- Illuminate\Support\Traits\ForwardsCalls
- Illuminate\Support\Traits\ReflectsClosures
- ForwardsCalls
interfaces:
- Factory