You are here

public function DOMTreeBuilderTest::testMathMLAttribute in Zircon Profile 8.0

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

File

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

Class

DOMTreeBuilderTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testMathMLAttribute() {
  $html = '<!doctype html>
      <html lang="en">
        <body>
          <math>
            <mi>x</mi>
            <csymbol definitionurl="http://www.example.com/mathops/multiops.html#plusminus">
              <mo>&PlusMinus;</mo>
            </csymbol>
            <mi>y</mi>
          </math>
        </body>
      </html>';
  $doc = $this
    ->parse($html);
  $root = $doc->documentElement;
  $csymbol = $root
    ->getElementsByTagName('csymbol')
    ->item(0);
  $this
    ->assertTrue($csymbol
    ->hasAttribute('definitionURL'));
}