Skip to content

Commit

Permalink
Add cases for the current escape state
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jun 26, 2024
1 parent eeb1fe4 commit e9b877a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/framework/tests/Feature/IncludesFacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ public function testIncludesUsageFromBladeView()
{!! Includes::html('foo') !!}
{!! Includes::blade('foo') !!}
{!! Includes::markdown('foo') !!}
// With escaped
{{ Includes::html('foo.html') }}
{{ Includes::blade('foo.blade.php') }}
{{ Includes::markdown('foo.md') }}
BLADE;

$expected = <<<'HTML'
Expand All @@ -250,6 +255,11 @@ public function testIncludesUsageFromBladeView()
<h1>Literal HTML</h1>
<h1>Rendered Blade</h1>
<h1>Compiled Markdown</h1>
// With escaped
&lt;h1&gt;Literal HTML&lt;/h1&gt;
&lt;h1&gt;Rendered Blade&lt;/h1&gt;
&lt;h1&gt;Compiled Markdown&lt;/h1&gt;
HTML;

$this->assertSame($expected, Blade::render($view));
Expand Down

0 comments on commit e9b877a

Please sign in to comment.