public function FileInputStreamTest::testColumnOffset in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/FileInputStreamTest.php \Masterminds\HTML5\Tests\Parser\FileInputStreamTest::testColumnOffset()
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ FileInputStreamTest.php, line 59
Class
Namespace
Masterminds\HTML5\Tests\ParserCode
public function testColumnOffset() {
$s = new FileInputStream(__DIR__ . '/FileInputStreamTest.html');
$this
->assertEquals(0, $s
->columnOffset());
$s
->next();
$this
->assertEquals(1, $s
->columnOffset());
$s
->next();
$this
->assertEquals(2, $s
->columnOffset());
$s
->next();
$this
->assertEquals(3, $s
->columnOffset());
// Make sure we get to the second line
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$s
->next();
$this
->assertEquals(0, $s
->columnOffset());
$s
->next();
$canary = $s
->current();
// h
$this
->assertEquals('h', $canary);
$this
->assertEquals(1, $s
->columnOffset());
}