diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/HTML5/Parser/DOMTreeBuilderTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/HTML5/Parser/DOMTreeBuilderTest.php b/test/HTML5/Parser/DOMTreeBuilderTest.php index 2745395..c1b19e5 100644 --- a/test/HTML5/Parser/DOMTreeBuilderTest.php +++ b/test/HTML5/Parser/DOMTreeBuilderTest.php @@ -56,6 +56,15 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $this->assertInstanceOf('\DOMDocument', $doc); $this->assertEquals('html', $doc->documentElement->tagName); } + public function testDocumentFakeAttrAbsence() + { + $html = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\"><body>foo</body></html>"; + $doc = $this->parse($html, array('xmlNamespaces'=>true)); + + $xp = new \DOMXPath($doc); + $this->assertEquals(0, $xp->query("//@html5-php-fake-id-attribute")->length); + + } public function testFragment() { |