You are here

public function DOMTreeBuilderTest::testDocumentFakeAttrAbsence in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php \Masterminds\HTML5\Tests\Parser\DOMTreeBuilderTest::testDocumentFakeAttrAbsence()

File

vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php, line 104
Test the Tree Builder.

Class

DOMTreeBuilderTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

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);
}