You are here

public function vfsStreamFileTestCase::readEmptyFile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php \org\bovigo\vfs\vfsStreamFileTestCase::readEmptyFile()

test reading contents from the file

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php, line 78

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

public function readEmptyFile() {
  $this
    ->assertTrue($this->file
    ->eof());
  $this
    ->assertEquals(0, $this->file
    ->size());
  $this
    ->assertEquals('', $this->file
    ->read(5));
  $this
    ->assertEquals(5, $this->file
    ->getBytesRead());
  $this
    ->assertTrue($this->file
    ->eof());
}