You are here

public function CharacterReferenceTest::testLookupName in Zircon Profile 8

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

File

vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php, line 13
Test the Scanner. This requires the InputStream tests are all good.

Class

CharacterReferenceTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testLookupName() {
  $this
    ->assertEquals('&', CharacterReference::lookupName('amp'));
  $this
    ->assertEquals('<', CharacterReference::lookupName('lt'));
  $this
    ->assertEquals('>', CharacterReference::lookupName('gt'));
  $this
    ->assertEquals('"', CharacterReference::lookupName('quot'));
  $this
    ->assertEquals('∌', CharacterReference::lookupName('NotReverseElement'));
  $this
    ->assertNull(CharacterReference::lookupName('StinkyCheese'));
}