Created
December 8, 2017 09:17
-
-
Save ohnotnow/ac8ccc03bdea692fc2a2854d0849a459 to your computer and use it in GitHub Desktop.
Rendering the contents of a laravel mail notification in a test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notification::assertSentTo($user, MyNotification::class, function ($notification) use ($user) { | |
$markdown = app(\Illuminate\Mail\Markdown::class); | |
$mail = $notification->toMail($user); | |
dd($markdown->render($mail->markdown, $mail->data())); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment