user = User::factory()->create(); $this->testEmailSettingNotification = new TestEmailSettingNotification('test_token'); } #[Test] public function test_it_renders_to_email() { $mail = $this->testEmailSettingNotification->toMail($this->user); $this->assertInstanceOf(MailMessage::class, $mail); } #[Test] public function test_rendered_email_contains_expected_data() { $mail = $this->testEmailSettingNotification->toMail($this->user)->render(); $this->assertStringContainsString( __('notifications.test_email_settings.success'), $mail ); } }