Sep 19, 2022
0
Level 11
How to test default MAIL_FROM_ADDRESS
Hi everyone, does anybody know how to test that default values are being passed from the .env file. I have the MAIL_FROM_ADDRESS set in the .env file but when I try to test using
&& $mail->hasFrom('[email protected]');
as part of the test below, it fails. The test below passes but fails when the above code is added.
Mail::assertSent(EmailTemplate::class, function ($mail) { $mail->build(); return $mail->hasSubject('Attachment Test') && $mail->hasTo('[email protected]') && $mail->hasAttachment(public_path('storage\test.png')); });
Please or to participate in this conversation.