You are here

public function TokenizerTest::testIllegalTagNames in Zircon Profile 8.0

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

File

vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php, line 551

Class

TokenizerTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testIllegalTagNames() {
  $cases = array(
    '<li">' => 'li',
    '<p">' => 'p',
    '<b&nbsp; >' => 'b',
    '<static*all>' => 'static',
    '<h*0720/>' => 'h',
    '<st*ATTRIBUTE />' => 'st',
  );
  foreach ($cases as $html => $expected) {
    $events = $this
      ->parse($html);
    $this
      ->assertEventError($events
      ->get(0));
    $this
      ->assertEventEquals('startTag', $expected, $events
      ->get(1));
  }
}