Jun 19, 2020
0
Level 10
How do I make this mail test fail (or send something/anything in this test)?
How can I make this test fail? This isn't the actual test I want to perform, but I'm confused as to why it isn't failing. I would have thought that Mail::raw() would have sent something in this case.
/** @test */
public function emailTest()
{
Mail::fake();
Mail::raw('Text to e-mail', function ($message) {
$message->to('[email protected]');
});
Mail::assertNothingSent();
}
As a side question, how can I test if anything and not something specific was sent? I feel like that is making this question unnecessary confusing. 😐
Please or to participate in this conversation.