bodyToHtml("Thank you.\n\nPay here: https://example.com/pay?token=abc"); $this->assertStringContainsString('

Thank you.

', $html); $this->assertStringContainsString('href="https://example.com/pay?token=abc"', $html); $this->assertStringNotContainsString('bodyToHtml('Code'); $this->assertStringContainsString('<strong>Code</strong>', $html); $this->assertStringNotContainsString('Code', $html); } public function test_email_layout_renders_safe_bold_markers_after_escaping_body(): void { $html = app(EmailLayoutRenderer::class)->bodyToHtml('Your code is **123456**. Do not trust ****.'); $this->assertStringContainsString('Your code is 123456.', $html); $this->assertStringContainsString('<script>bad</script>', $html); $this->assertStringNotContainsString('', $html); } public function test_email_layout_has_black_header_and_footer_fallbacks_without_script(): void { $template = file_get_contents(resource_path('views/emails/mdn-layout.blade.php')); $this->assertStringContainsString('background-color: #0b0b0b', $template); $this->assertStringContainsString('bgcolor="#0b0b0b"', $template); $this->assertStringContainsString('
', $template); $this->assertStringContainsString('