You are here

public function StringInputStreamTest::testCurrent 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::testCurrent()

File

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

Class

StringInputStreamTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testCurrent() {
  $s = new StringInputStream("abc");

  // Before scanning the string begins the current is empty.
  $this
    ->assertEquals('a', $s
    ->current());
  $s
    ->next();
  $this
    ->assertEquals('b', $s
    ->current());

  // Test movement through the string.
  $s
    ->next();
  $this
    ->assertEquals('c', $s
    ->current());
}