I'm running Laravel 5.4 and testing Mailables with Mail::fake() and Mail::assertSent(). There are assertions for things like hasTo($email) and hasCc($email), but there doesn't seem to be a way to access the message contents. I would like to test that the email body contains a particular string.
Pseudocode:
Mail::assertSent(UserInvited::class, function($mail) use($token) {
return $mail->bodyContains($token); # that method does not really exist
});
Is this possible?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jx2Ajv
via IFTTT
Aucun commentaire:
Enregistrer un commentaire