public function ScannerTest::testColumnOffset in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/ScannerTest.php \Masterminds\HTML5\Tests\Parser\ScannerTest::testColumnOffset()
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ ScannerTest.php, line 145 - Test the Scanner. This requires the InputStream tests are all good.
Class
Namespace
Masterminds\HTML5\Tests\ParserCode
public function testColumnOffset() {
$s = new Scanner(new StringInputStream("1784a a\n45 9867 #\nThis is a test."));
// Move the pointer to the space.
$s
->getAsciiAlphaNum();
$this
->assertEquals(5, $s
->columnOffset());
// We move the pointer ahead. There must be a better way to do this.
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$this
->assertEquals(3, $s
->columnOffset());
}