public function vfsStreamFileTestCase::seekEmptyFile in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php \org\bovigo\vfs\vfsStreamFileTestCase::seekEmptyFile()
test seeking to offset
@test
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamFileTestCase.php, line 117
Class
Namespace
org\bovigo\vfsCode
public function seekEmptyFile() {
$this
->assertFalse($this->file
->seek(0, 55));
$this
->assertTrue($this->file
->seek(0, SEEK_SET));
$this
->assertEquals(0, $this->file
->getBytesRead());
$this
->assertTrue($this->file
->seek(5, SEEK_SET));
$this
->assertEquals(5, $this->file
->getBytesRead());
$this
->assertTrue($this->file
->seek(0, SEEK_CUR));
$this
->assertEquals(5, $this->file
->getBytesRead());
$this
->assertTrue($this->file
->seek(2, SEEK_CUR));
$this
->assertEquals(7, $this->file
->getBytesRead());
$this
->assertTrue($this->file
->seek(0, SEEK_END));
$this
->assertEquals(0, $this->file
->getBytesRead());
$this
->assertTrue($this->file
->seek(2, SEEK_END));
$this
->assertEquals(2, $this->file
->getBytesRead());
}