diff options
author | Asmir Mustafic <[email protected]> | 2014-06-30 12:10:44 +0200 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2014-06-30 12:10:44 +0200 |
commit | 7c176539423d7e1acd0e5191855bdee8f0ed1a37 (patch) | |
tree | 140b75c1a43291f72972fb4ac4c2b4c90ad62113 /test/HTML5/Parser/DOMTreeBuilderTest.php | |
parent | 45e0f801d896258022c6a70a7738b991cb19aafe (diff) |
Fiexed a issue when xmlNamespaces = true
Diffstat (limited to 'test/HTML5/Parser/DOMTreeBuilderTest.php')
-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() { |