mardi 25 septembre 2018

Laravel Mail issue while testing

I've encountered a problem while testing:

I try to test the Sending of a Mail with the Laravel Mail::fake() like this:

/** @test */
public function an_activation_mail_gets_send_on_registration()
{
    Mail::fake();

    Mail::to('john@example.com')->send(new TestMail());

    Mail::asserSent(TestMail::class);
}

The error I get is:

Error : Call to undefined method Illuminate\Support\Testing\Fakes\MailFake::asserSent()

In my opinion its all the same like in the docs: https://laravel.com/docs/master/mocking#mail-fake

Anyone knows a solution for this?

Aucun commentaire:

Enregistrer un commentaire