You are here

public function ElementsTest::testIsSvgElement in Zircon Profile 8

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

File

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

Class

ElementsTest

Namespace

Masterminds\HTML5\Tests

Code

public function testIsSvgElement() {
  foreach ($this->svgElements as $element) {
    $this
      ->assertTrue(Elements::isSvgElement($element), 'SVG element test failed on: ' . $element);

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