Skip to content

Commit 895e017

Browse files
committed
wip
1 parent 3117ffb commit 895e017

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

app/Mail/TestMail.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,4 @@ public function content(): Content
3131
text: 'mail.test',
3232
);
3333
}
34-
35-
public function attachments(): array
36-
{
37-
return [];
38-
}
3934
}

phpunit.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<!--<testsuite name="Unit">
1515
<directory>tests/Unit</directory>
1616
</testsuite>-->
17-
<testsuite name="Arch">
17+
<!--<testsuite name="Arch">
1818
<file>tests/ArchTest.php</file>
1919
<directory>tests/Arch</directory>
20-
</testsuite>
20+
</testsuite>-->
2121
</testsuites>
2222
<source>
2323
<include>

tests/Console/TestMailCommandTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
Mail::assertSent(TestMail::class, function (TestMail $mail) {
1818
return $mail->hasTo('test@example.com');
1919
});
20+
21+
Mail::assertSent(TestMail::class, function (TestMail $mail) {
22+
$mail->assertSeeInText('This is a test email from your application.');
23+
$mail->assertSeeInText('your mail configuration is working correctly');
24+
$mail->assertSeeInText('Sent at:');
25+
26+
return true;
27+
});
2028
});
2129

2230
it('sends test mail to all admin users', function () {
@@ -31,6 +39,14 @@
3139
Mail::assertSent(TestMail::class, function (TestMail $mail) use ($admin) {
3240
return $mail->hasTo($admin->email);
3341
});
42+
43+
Mail::assertSent(TestMail::class, function (TestMail $mail) {
44+
$mail->assertSeeInText('This is a test email from your application.');
45+
$mail->assertSeeInText('your mail configuration is working correctly');
46+
$mail->assertSeeInText('Sent at:');
47+
48+
return true;
49+
});
3450
});
3551

3652
it('warns when no admin users exist', function () {

0 commit comments

Comments
 (0)