You are here

public function ElementsTest::testIsHtml5Element 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::testIsHtml5Element()

File

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

Class

ElementsTest

Namespace

Masterminds\HTML5\Tests

Code

public function testIsHtml5Element() {
  foreach ($this->html5Elements as $element) {
    $this
      ->assertTrue(Elements::isHtml5Element($element), 'html5 element test failed on: ' . $element);
    $this
      ->assertTrue(Elements::isHtml5Element(strtoupper($element)), 'html5 element test failed on: ' . strtoupper($element));
  }
  $nonhtml5 = array(
    'foo',
    'bar',
    'baz',
  );
  foreach ($nonhtml5 as $element) {
    $this
      ->assertFalse(Elements::isHtml5Element($element), 'html5 element test failed on: ' . $element);
    $this
      ->assertFalse(Elements::isHtml5Element(strtoupper($element)), 'html5 element test failed on: ' . strtoupper($element));
  }
}