We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f91965 commit 9a409cfCopy full SHA for 9a409cf
tests/Support/SupportMailTest.php
@@ -2,6 +2,7 @@
2
3
namespace Illuminate\Tests\Support;
4
5
+use Illuminate\Mail\Mailable;
6
use Illuminate\Support\Facades\Mail;
7
use Orchestra\Testbench\TestCase;
8
@@ -28,4 +29,27 @@ public function testItRegisterAndCallMacrosWhenFaked()
28
29
30
$this->assertEquals('it works!', Mail::test('foo'));
31
}
32
+
33
+ public function testEmailSent()
34
+ {
35
+ Mail::fake();
36
+ Mail::assertNothingSent();
37
38
+ Mail::to('[email protected]')->send(new TestMail());
39
40
+ Mail::assertSent(TestMail::class);
41
+ }
42
+}
43
44
+class TestMail extends Mailable
45
+{
46
+ /**
47
+ * Build the message.
48
+ *
49
+ * @return $this
50
+ */
51
+ public function build()
52
53
+ return $this->view('view');
54
55
0 commit comments