diff options
Diffstat (limited to 'test/HTML5/Parser')
-rw-r--r-- | test/HTML5/Parser/DOMTreeBuilderTest.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/test/HTML5/Parser/DOMTreeBuilderTest.php b/test/HTML5/Parser/DOMTreeBuilderTest.php index 562b9d5..de7c54c 100644 --- a/test/HTML5/Parser/DOMTreeBuilderTest.php +++ b/test/HTML5/Parser/DOMTreeBuilderTest.php @@ -107,11 +107,25 @@ class DOMTreeBuilderTest extends \HTML5\Tests\TestCase { } public function testCDATA() { - $this->markTestIncomplete("Incomplete."); + $html = "<!DOCTYPE html><html><mathml><![CDATA[test]]></mathml></html>"; + $doc = $this->parse($html); + + $wrapper = $doc->getElementsByTagName('mathml')->item(0); + $this->assertEquals(1, $wrapper->childNodes->length); + $cdata = $wrapper->childNodes->item(0); + $this->assertEquals(XML_CDATA_SECTION_NODE, $cdata->nodeType); + $this->assertEquals('test', $cdata->data); } public function testText() { - $this->markTestIncomplete("Incomplete."); + $html = "<!DOCTYPE html><html><head></head><body><mathml>test</mathml></body></html>"; + $doc = $this->parse($html); + + $wrapper = $doc->getElementsByTagName('mathml')->item(0); + $this->assertEquals(1, $wrapper->childNodes->length); + $data = $wrapper->childNodes->item(0); + $this->assertEquals(XML_TEXT_NODE, $data->nodeType); + $this->assertEquals('test', $data->data); } public function testParseErrors() { @@ -130,4 +144,12 @@ class DOMTreeBuilderTest extends \HTML5\Tests\TestCase { $this->assertEquals(0, $p->childNodes->length); $this->assertEquals('figure', $p->nextSibling->tagName); } + + public function testMathML() { + $this->markTestIncomplete("Incomplete."); + } + + public function testSVG() { + $this->markTestIncomplete("Incomplete."); + } } |