You are here

public function ScannerTest::testCurrentLine in Zircon Profile 8

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

File

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

Class

ScannerTest

Namespace

Masterminds\HTML5\Tests\Parser

Code

public function testCurrentLine() {
  $s = new Scanner(new StringInputStream("1784a\n45\n9867 #\nThis is a test."));
  $this
    ->assertEquals(1, $s
    ->currentLine());

  // Move to the next line.
  $s
    ->getAsciiAlphaNum();
  $s
    ->next();
  $this
    ->assertEquals(2, $s
    ->currentLine());
}