You are here

public function DOMTreeBuilderTest::testAutocloseP 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::testAutocloseP()

File

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

Class

DOMTreeBuilderTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testAutocloseP() {
  $html = "<!DOCTYPE html><html><body><p><figure></body></html>";
  $doc = $this
    ->parse($html);
  $p = $doc
    ->getElementsByTagName('p')
    ->item(0);
  $this
    ->assertEquals(0, $p->childNodes->length);
  $this
    ->assertEquals('figure', $p->nextSibling->tagName);
}