You are here

public function StringInputStreamTest::testBOM in Zircon Profile 8.0

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

File

vendor/masterminds/html5/test/HTML5/Parser/StringInputStreamTest.php, line 163

Class

StringInputStreamTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testBOM() {

  // Ignore in-text BOM.
  $stream = new StringInputStream("a");
  $this
    ->assertEquals("a", $stream
    ->remainingChars(), 'A non-leading U+FEFF (BOM/ZWNBSP) should remain');

  // Strip leading BOM
  $leading = new StringInputStream("a");
  $this
    ->assertEquals('a', $leading
    ->current(), 'BOM should be stripped');
}