You are here

public function vfsStreamWrapperFileTestCase::canNotReadFromWriteOnlyFileWithModeA in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTestCase::canNotReadFromWriteOnlyFileWithModeA()

@test @group issue7 @group issue13

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php, line 276

Class

vfsStreamWrapperFileTestCase
Test for org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function canNotReadFromWriteOnlyFileWithModeA() {
  $fp = fopen($this->baz2URL, 'ab');
  $this
    ->assertEquals('', fread($fp, 4096));
  $this
    ->assertEquals(3, fwrite($fp, 'foo'));
  fseek($fp, 0);
  $this
    ->assertEquals('', fread($fp, 4096));
  fclose($fp);
  $this
    ->assertEquals('baz2foo', file_get_contents($this->baz2URL));
}