Skip to content

Commit 254f6e4

Browse files
committed
Added test for empty non-void elemenet
1 parent ff74a39 commit 254f6e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/internal/Magento/Framework/View/Test/Unit/Helper/SecureHtmlRenderer/HtmlRendererTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ public function testRenderTag()
4343
$helper->renderTag($tag)
4444
);
4545

46+
/** Test any non-void element to not have a closing tag while not having content */
47+
$tags = new TagData('script', [], null, false);
48+
$this->assertEquals(
49+
"<script></script>",
50+
$helper->renderTag($tags)
51+
);
52+
4653
/** Test any non-void element to not have a closing tag and allow content */
4754
$tags = new TagData('script', [], 'content', false);
4855
$this->assertEquals(

0 commit comments

Comments
 (0)