You are here

public function DOMTreeBuilderTest::testMoveNonInlineElements in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php \Masterminds\HTML5\Tests\Parser\DOMTreeBuilderTest::testMoveNonInlineElements()

File

vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php, line 251
Test the Tree Builder.

Class

DOMTreeBuilderTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testMoveNonInlineElements() {
  $doc = $this
    ->parse('<p>line1<br/><hr/>line2</p>');
  $this
    ->assertEquals('<html xmlns="http://www.w3.org/1999/xhtml"><p>line1<br/></p><hr/>line2</html>', $doc
    ->saveXML($doc->documentElement), 'Move non-inline elements outside of inline containers.');
  $doc = $this
    ->parse('<p>line1<div>line2</div></p>');
  $this
    ->assertEquals('<html xmlns="http://www.w3.org/1999/xhtml"><p>line1</p><div>line2</div></html>', $doc
    ->saveXML($doc->documentElement), 'Move non-inline elements outside of inline containers.');
}