You are here

public function vfsStreamWrapperLargeFileTestCase::canWriteIntoLargeFile in Zircon Profile 8

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

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php, line 65

Class

vfsStreamWrapperLargeFileTestCase
Test for large file mocks.

Namespace

org\bovigo\vfs

Code

public function canWriteIntoLargeFile() {
  $fp = fopen($this->largeFile
    ->url(), 'rb+');
  fseek($fp, 100 * 1024 * 1024, SEEK_SET);
  fwrite($fp, 'foobarbaz');
  fclose($fp);
  $this->largeFile
    ->seek(100 * 1024 * 1024 - 3, SEEK_SET);
  $this
    ->assertEquals('   foobarbaz   ', $this->largeFile
    ->read(15));
}