You are here

public function ElementsTest::testIsMathMLElement in Zircon Profile 8.0

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

File

vendor/masterminds/html5/test/HTML5/ElementsTest.php, line 267

Class

ElementsTest

Namespace

Masterminds\HTML5\Tests

Code

public function testIsMathMLElement() {
  foreach ($this->mathmlElements as $element) {
    $this
      ->assertTrue(Elements::isMathMLElement($element), 'MathML element test failed on: ' . $element);

    // MathML is case sensetitive so these should all fail.
    $this
      ->assertFalse(Elements::isMathMLElement(strtoupper($element)), 'MathML element test failed on: ' . strtoupper($element));
  }
  $nonMathML = array(
    'foo',
    'bar',
    'baz',
  );
  foreach ($nonMathML as $element) {
    $this
      ->assertFalse(Elements::isMathMLElement($element), 'MathML element test failed on: ' . $element);
  }
}