summaryrefslogtreecommitdiff
path: root/test/HTML5/Parser/TreeBuildingRulesTest.php
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-11-04 16:57:29 -0500
committerMatt Farina <[email protected]>2013-11-04 16:57:29 -0500
commit10e129bd8be814b3b8a327416c2c4e1d67b0f678 (patch)
tree7ceb1576d808bd8802fc004d9f81aa4f29ee58ed /test/HTML5/Parser/TreeBuildingRulesTest.php
parent246ed7785e93cc1ebf59a2f15af61472d20efca0 (diff)
#20 Some of the parser rules, for special cases, were not returning the element to use as the current element. This caused the current parser element to get messed up.
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);
+ }
+
}