From 27ba1335239833cba2bfcaeebc0c3195a535a004 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Wed, 1 May 2013 11:18:19 -0500 Subject: Fixed CDATA. --- test/HTML5/Parser/DOMTreeBuilderTest.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'test/HTML5/Parser') diff --git a/test/HTML5/Parser/DOMTreeBuilderTest.php b/test/HTML5/Parser/DOMTreeBuilderTest.php index 562b9d5..d94c824 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 = ""; + $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 = "test"; + $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."); + } } -- cgit v1.2.3