Skip to content

Commit

Permalink
add tests for quotes in todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleuverink committed Aug 15, 2024
1 parent 9fd011e commit 851b9b2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/Feature/BladeCommentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('<span class="magic-todo-mark" data-todo="Foo &amp;quot;Bar&amp;quot; baz">');
});

it('compiles empty Blade TODO comments', function () {
$html = Blade::render(<<< 'BLADE'
{{-- |TODO: --}}
Expand Down
10 changes: 10 additions & 0 deletions tests/Feature/HtmlCommentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
HTML);
});

it('compiles quotes in Blade HTML comments', function () {
$html = Blade::render(<<< 'BLADE'
<!-- |TODO: Foo "Bar" baz -->
BLADE);

expect($html)
->not->toContain('<!-- TODO')
->toContain('<span class="magic-todo-mark" data-todo="Foo &amp;quot;Bar&amp;quot; baz">');
});

it('compiles empty HTML TODO comments', function () {
$html = Blade::render('<!-- |TODO: -->');

Expand Down

0 comments on commit 851b9b2

Please sign in to comment.