You are here

public function TreeBuildingRulesTest::testTDFragment in Zircon Profile 8.0

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

File

vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php, line 47
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 testTDFragment() {
  $frag = $this
    ->parseFragment("<td>This is a test of the HTML5 parser</td>");
  $td = $frag->childNodes
    ->item(0);
  $this
    ->assertEquals(1, $frag->childNodes->length);
  $this
    ->assertEquals('td', $td->tagName);
  $this
    ->assertEquals('This is a test of the HTML5 parser', $td->nodeValue);
}