public function vfsStreamWrapperFileTestCase::file_put_contentsExistingNonWritableFile in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTestCase::file_put_contentsExistingNonWritableFile()
@test @group permissions @group bug_15
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperFileTestCase.php, line 78
Class
Namespace
org\bovigo\vfsCode
public function file_put_contentsExistingNonWritableFile() {
vfsStreamWrapper::register();
vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
vfsStream::newFile('new.txt', 0400)
->at(vfsStreamWrapper::getRoot())
->withContent('content');
$this
->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.'));
$this
->assertEquals('content', file_get_contents(vfsStream::url('root/new.txt')));
}