public function vfsStreamWrapperQuotaTestCase::considersAllFilesForQuota in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php \org\bovigo\vfs\vfsStreamWrapperQuotaTestCase::considersAllFilesForQuota()
@test
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperQuotaTestCase.php, line 71
Class
- vfsStreamWrapperQuotaTestCase
- Test for quota related functionality of org\bovigo\vfs\vfsStreamWrapper.
Namespace
org\bovigo\vfsCode
public function considersAllFilesForQuota() {
vfsStream::newFile('foo.txt')
->withContent('foo')
->at(vfsStream::newDirectory('bar')
->at($this->root));
try {
file_put_contents(vfsStream::url('root/file.txt'), '12345678901');
} catch (\PHPUnit_Framework_Error $e) {
$this
->assertEquals('file_put_contents(): Only 7 of 11 bytes written, possibly out of free disk space', $e
->getMessage());
}
$this
->assertEquals('1234567', $this->root
->getChild('file.txt')
->getContent());
}