MailFake
Implements
Uses
Properties
$currentMailer string
The mailer currently being used to send a message.
$mailables array
All of the mailables that have been sent.
$queuedMailables array
All of the mailables that have been queued.
Methods
__construct ( MailManager $manager ) : void
Create a new mail fake.
Parameters
- $manager MailManager
assertSent ( $mailable , $callback ) : void
Assert if a mailable was sent based on a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|int|null
assertSentTimes ( $mailable , $times ) : void
Assert if a mailable was sent a number of times.
Parameters
- $mailable string
- $times int
assertNotOutgoing ( $mailable , $callback ) : void
Determine if a mailable was not sent or queued to be sent based on a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|null
assertNotSent ( $mailable , $callback ) : void
Determine if a mailable was not sent based on a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|null
assertNothingOutgoing ( ) : void
Assert that no mailables were sent or queued to be sent.
assertNothingSent ( ) : void
Assert that no mailables were sent.
assertQueued ( $mailable , $callback ) : void
Assert if a mailable was queued based on a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|int|null
assertQueuedTimes ( $mailable , $times ) : void
Assert if a mailable was queued a number of times.
Parameters
- $mailable string
- $times int
assertNotQueued ( $mailable , $callback ) : void
Determine if a mailable was not queued based on a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|null
assertNothingQueued ( ) : void
Assert that no mailables were queued.
assertSentCount ( $count ) : void
Assert the total number of mailables that were sent.
Parameters
- $count int
assertQueuedCount ( $count ) : void
Assert the total number of mailables that were queued.
Parameters
- $count int
assertOutgoingCount ( $count ) : void
Assert the total number of mailables that were sent or queued.
Parameters
- $count int
sent ( $mailable , $callback ) : Illuminate\...\Collection
Get all of the mailables matching a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|null
hasSent ( $mailable ) : bool
Determine if the given mailable has been sent.
Parameters
- $mailable string
queued ( $mailable , $callback ) : Illuminate\...\Collection
Get all of the queued mailables matching a truth-test callback.
Parameters
- $mailable string|Closure
- $callback callable|null
hasQueued ( $mailable ) : bool
Determine if the given mailable has been queued.
Parameters
- $mailable string
mailablesOf ( $type ) : Illuminate\...\Collection
Get all of the mailed mailables for a given type.
Parameters
- $type string
queuedMailablesOf ( $type ) : Illuminate\...\Collection
Get all of the mailed mailables for a given type.
Parameters
- $type string
to ( $users ) : PendingMail
Begin the process of mailing a mailable class instance.
Parameters
- $users mixed
cc ( $users ) : PendingMail
Begin the process of mailing a mailable class instance.
Parameters
- $users mixed
bcc ( $users ) : PendingMail
Begin the process of mailing a mailable class instance.
Parameters
- $users mixed
raw ( $text , $callback ) : void
Send a new message with only a raw text part.
Parameters
- $text string
- $callback Closure |string
send ( $view , array $data , $callback ) : void
Send a new message using a view.
Parameters
queue ( $view , $queue ) : mixed
Queue a new e-mail message for sending.
Parameters
- $view Mailable |string|array
- $queue string|null
later ( $delay , $view , $queue ) : mixed
Queue a new e-mail message for sending after (n) seconds.
Parameters
- $delay DateTimeInterface |DateInterval |int
- $view Mailable |string|array
- $queue string|null
prepareMailableAndCallback ( $mailable , $callback ) : array
Infer mailable class using reflection if a typehinted closure is passed to assertion.
Parameters
- $mailable string|Closure
- $callback callable|null
forgetMailers ( ) : $this
Forget all of the resolved mailer instances.
__call ( $method , $parameters ) : mixed
Handle dynamic method calls to the mailer.
Parameters
- $method string
- $parameters array