You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Laravel provides a variety of methods for inspecting your mailable's structure. In addition, Laravel provides several convenient methods for testing that your mailable contains the content that you expect. These methods are: `assertSeeInHtml`, `assertDontSeeInHtml`, `assertSeeInOrderInHtml`, `assertSeeInText`, `assertDontSeeInText`, `assertSeeInOrderInText`, `assertHasAttachment`, `assertHasAttachedData`, `assertHasAttachmentFromStorage`, and `assertHasAttachmentFromStorageDisk`.
1186
-
1187
-
As you might expect, the "HTML" assertions assert that the HTML version of your mailable contains a given string, while the "text" assertions assert that the plain-text version of your mailable contains a given string:
1185
+
Laravel provides a variety of methods for inspecting your mailable's structure. In addition, Laravel provides several convenient methods for testing that your mailable contains the content that you expect:
1188
1186
1189
1187
```php tab=Pest
1190
1188
use App\Mail\InvoicePaid;
@@ -1205,10 +1203,11 @@ test('mailable content', function () {
1205
1203
$mailable->assertHasMetadata('key', 'value');
1206
1204
1207
1205
$mailable->assertSeeInHtml($user->email);
1208
-
$mailable->assertSeeInHtml('Invoice Paid');
1206
+
$mailable->assertDontSeeInHtml('Invoice Not Paid');
@@ -1253,6 +1253,8 @@ public function test_mailable_content(): void
1253
1253
}
1254
1254
```
1255
1255
1256
+
As you might expect, the "HTML" assertions assert that the HTML version of your mailable contains a given string, while the "text" assertions assert that the plain-text version of your mailable contains a given string.
0 commit comments