summaryrefslogtreecommitdiff
path: root/test/HTML5/Parser/TreeBuildingRulesTest.php
diff options
context:
space:
mode:
authorMatt Butcher <[email protected]>2014-02-11 09:56:01 -0700
committerMatt Butcher <[email protected]>2014-02-11 09:56:01 -0700
commit44e8e23626bf619844baf9983e931d2f58606377 (patch)
tree62625f63a954ab5a3f9bb4184039a68496e3896a /test/HTML5/Parser/TreeBuildingRulesTest.php
parent77ad931cd824feb33eebae08cf3a5a47bce1e337 (diff)
parent3b691837c6d7a0969137048fbda274463d6b1d7c (diff)
Merge branch 'master' of github.com:Masterminds/html5-php
Diffstat (limited to 'test/HTML5/Parser/TreeBuildingRulesTest.php')
-rw-r--r--test/HTML5/Parser/TreeBuildingRulesTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/HTML5/Parser/TreeBuildingRulesTest.php b/test/HTML5/Parser/TreeBuildingRulesTest.php
index fe02893..a247cea 100644
--- a/test/HTML5/Parser/TreeBuildingRulesTest.php
+++ b/test/HTML5/Parser/TreeBuildingRulesTest.php
@@ -62,4 +62,15 @@ class TreeBuildingRulesTest extends \HTML5\Tests\TestCase {
$this->assertEquals('dd', $list->lastChild->tagName);
}
+ public function testTable() {
+ $html = sprintf(self::HTML_STUB, '<table><thead id="a"><th>foo<td>bar<td>baz');
+ $doc = $this->parse($html);
+
+ $list = $doc->getElementById('a');
+
+ $this->assertEquals(3, $list->childNodes->length);
+ $this->assertEquals('th', $list->firstChild->tagName);
+ $this->assertEquals('td', $list->lastChild->tagName);
+ }
+
}