public function vfsStreamWrapperMkDirTestCase::mkdirDirCanNotCreateNewDirInNonWritingDirectory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php \org\bovigo\vfs\vfsStreamWrapperMkDirTestCase::mkdirDirCanNotCreateNewDirInNonWritingDirectory()
@test @group permissions @group bug_15
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperDirTestCase.php, line 192
Class
- vfsStreamWrapperMkDirTestCase
- Test for org\bovigo\vfs\vfsStreamWrapper around mkdir().
Namespace
org\bovigo\vfsCode
public function mkdirDirCanNotCreateNewDirInNonWritingDirectory() {
vfsStreamWrapper::register();
vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
vfsStreamWrapper::getRoot()
->addChild(new vfsStreamDirectory('restrictedFolder', 00));
$this
->assertFalse(is_writable(vfsStream::url('root/restrictedFolder/')));
$this
->assertFalse(mkdir(vfsStream::url('root/restrictedFolder/newFolder')));
$this
->assertFalse(vfsStreamWrapper::getRoot()
->hasChild('restrictedFolder/newFolder'));
}