You are here

public function TreeBuildingRulesTest::testHandleLI in Zircon Profile 8

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

File

vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php, line 68
Test the Tree Builder's special-case rules.

Class

TreeBuildingRulesTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testHandleLI() {
  $html = sprintf(self::HTML_STUB, '<ul id="a"><li>test<li>test2</ul><a></a>');
  $doc = $this
    ->parse($html);
  $list = $doc
    ->getElementById('a');
  $this
    ->assertEquals(2, $list->childNodes->length);
  foreach ($list->childNodes as $ele) {
    $this
      ->assertEquals('li', $ele->tagName);
  }
}