Skip to content

Commit 851b9b2

Browse files
committed
add tests for quotes in todo's
1 parent 9fd011e commit 851b9b2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/Feature/BladeCommentTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
HTML);
2727
});
2828

29+
it('compiles quotes in Blade TODO comments', function () {
30+
$html = Blade::render(<<< 'BLADE'
31+
{{-- |TODO: Foo "Bar" baz --}}
32+
BLADE);
33+
34+
expect($html)
35+
->not->toContain('{{-- TODO')
36+
->toContain('<span class="magic-todo-mark" data-todo="Foo &amp;quot;Bar&amp;quot; baz">');
37+
});
38+
2939
it('compiles empty Blade TODO comments', function () {
3040
$html = Blade::render(<<< 'BLADE'
3141
{{-- |TODO: --}}

tests/Feature/HtmlCommentTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
HTML);
2727
});
2828

29+
it('compiles quotes in Blade HTML comments', function () {
30+
$html = Blade::render(<<< 'BLADE'
31+
<!-- |TODO: Foo "Bar" baz -->
32+
BLADE);
33+
34+
expect($html)
35+
->not->toContain('<!-- TODO')
36+
->toContain('<span class="magic-todo-mark" data-todo="Foo &amp;quot;Bar&amp;quot; baz">');
37+
});
38+
2939
it('compiles empty HTML TODO comments', function () {
3040
$html = Blade::render('<!-- |TODO: -->');
3141

0 commit comments

Comments
 (0)