You are here

public function vfsStreamWrapperMkDirTestCase::mkdirWithoutRootCreatesNewRootDifferentPermissions in Zircon Profile 8

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

no root > new directory becomes root

@test @group permissions

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php, line 163

Class

vfsStreamWrapperMkDirTestCase
Test for org\bovigo\vfs\vfsStreamWrapper around mkdir().

Namespace

org\bovigo\vfs

Code

public function mkdirWithoutRootCreatesNewRootDifferentPermissions() {
  vfsStreamWrapper::register();
  $this
    ->assertTrue(@mkdir(vfsStream::url('foo'), 0755));
  $this
    ->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()
    ->getType());
  $this
    ->assertEquals('foo', vfsStreamWrapper::getRoot()
    ->getName());
  $this
    ->assertEquals(0755, vfsStreamWrapper::getRoot()
    ->getPermissions());
}