You are here

public function vfsStreamWrapperQuotaTestCase::writeMoreThanQotaWritesOnlyUpToQuota in Zircon Profile 8

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

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php, line 55

Class

vfsStreamWrapperQuotaTestCase
Test for quota related functionality of org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function writeMoreThanQotaWritesOnlyUpToQuota() {
  try {
    file_put_contents(vfsStream::url('root/file.txt'), '12345678901');
  } catch (\PHPUnit_Framework_Error $e) {
    $this
      ->assertEquals('file_put_contents(): Only 10 of 11 bytes written, possibly out of free disk space', $e
      ->getMessage());
  }
  $this
    ->assertEquals('1234567890', $this->root
    ->getChild('file.txt')
    ->getContent());
}