Skip to content

Commit

Permalink
Add extra test case
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 2, 2024
1 parent 2dd5c32 commit b1b6266
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/framework/tests/Unit/HeadingRendererUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ public function testPostProcessRemovesSpacesCausedByNoExtraBladeAttributes()
$this->assertSame('<h1>Title</h1><h2>Subtitle</h2>', $processedHtml);
}

public function testPostProcessRemovesSpacesCausedByNoExtraBladeAttributesButLeavesExtraAttributesAlone()
{
$renderer = new HeadingRenderer();
$html = "<h1 class=\"foo-bar baz\">Title</h1>\n<h2 >Subtitle</h2>";
$processedHtml = $renderer->postProcess($html);

$this->assertSame('<h1 class="foo-bar baz">Title</h1><h2>Subtitle</h2>', $processedHtml);
}

public function testPostProcessTrimsWhitespaceAndIndentationFromLines()
{
$renderer = new HeadingRenderer();
Expand Down

0 comments on commit b1b6266

Please sign in to comment.