You are here

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

File

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

Class

DOMTreeBuilderTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testAutocloseLI() {
  $html = '<!doctype html>
      <html lang="en">
        <body>
          <ul><li>Foo<li>Bar<li>Baz</ul>
        </body>
      </html>';
  $doc = $this
    ->parse($html);
  $length = $doc
    ->getElementsByTagName('ul')
    ->item(0)->childNodes->length;
  $this
    ->assertEquals(3, $length);
}