alphasolution's avatar

How to test the sender is my expect sender?

I am using Laravel 5.4. In my application, I use a Mailable class to send the email to our customer. I create a simple test to test the email is sent by the correct sender. the Mailable class has the method hasFrom() to test the email sender is expected or not. However, it always return false. Does anyone know how the hasForm() method work?

0 likes
1 reply
alphasolution's avatar

Fix the problem by add the following line in the assertSent function

$mail.build();

Please or to participate in this conversation.