You are here

public function CharacterReferenceTest::testLookupHex 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::testLookupHex()

File

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

Class

CharacterReferenceTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testLookupHex() {
  $this
    ->assertEquals('<', CharacterReference::lookupHex('3c'));
  $this
    ->assertEquals('<', CharacterReference::lookupHex('003c'));
  $this
    ->assertEquals('&', CharacterReference::lookupHex('26'));
  $this
    ->assertEquals('}', CharacterReference::lookupHex('7d'));
  $this
    ->assertEquals('Σ', CharacterReference::lookupHex('3A3'));
  $this
    ->assertEquals('Σ', CharacterReference::lookupHex('03A3'));
  $this
    ->assertEquals('Σ', CharacterReference::lookupHex('3a3'));
  $this
    ->assertEquals('Σ', CharacterReference::lookupHex('03a3'));
}