From 851b9b20f359aa1ac1c3b0cd08370b9bd2eb1519 Mon Sep 17 00:00:00 2001 From: gwleuverink Date: Thu, 15 Aug 2024 22:49:30 +0200 Subject: [PATCH] add tests for quotes in todo's --- tests/Feature/BladeCommentTest.php | 10 ++++++++++ tests/Feature/HtmlCommentTest.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/Feature/BladeCommentTest.php b/tests/Feature/BladeCommentTest.php index 30ec9f1..cfe5566 100644 --- a/tests/Feature/BladeCommentTest.php +++ b/tests/Feature/BladeCommentTest.php @@ -26,6 +26,16 @@ HTML); }); +it('compiles quotes in Blade TODO comments', function () { + $html = Blade::render(<<< 'BLADE' + {{-- |TODO: Foo "Bar" baz --}} + BLADE); + + expect($html) + ->not->toContain('{{-- TODO') + ->toContain(''); +}); + it('compiles empty Blade TODO comments', function () { $html = Blade::render(<<< 'BLADE' {{-- |TODO: --}} diff --git a/tests/Feature/HtmlCommentTest.php b/tests/Feature/HtmlCommentTest.php index 636b1ad..1edc339 100644 --- a/tests/Feature/HtmlCommentTest.php +++ b/tests/Feature/HtmlCommentTest.php @@ -26,6 +26,16 @@ HTML); }); +it('compiles quotes in Blade HTML comments', function () { + $html = Blade::render(<<< 'BLADE' + + BLADE); + + expect($html) + ->not->toContain('');