Skip to content

Instantly share code, notes, and snippets.

@peterfox
Last active May 19, 2020 21:50
<?php
namespace Tests\Feature;
use Illuminate\Mail\Events\MessageSending;
use Illuminate\Support\Facades\Event;
class ExampleTest extends TestCase
{
public function testEmailContainsString()
{
// Swapping out the event dispatcher for a fake
Event::fake([MessageSending::class]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment