You are here

public function vfsStreamDirectoryTestCase::permissionsSet in Zircon Profile 8

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

setting and retrieving permissions for a directory

@test @group permissions

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php, line 297

Class

vfsStreamDirectoryTestCase
Test for org\bovigo\vfs\vfsStreamDirectory.

Namespace

org\bovigo\vfs

Code

public function permissionsSet() {
  $this->dir = new vfsStreamDirectory('foo', 0755);
  $this
    ->assertEquals(0755, $this->dir
    ->getPermissions());
  $this
    ->assertSame($this->dir, $this->dir
    ->chmod(0700));
  $this
    ->assertEquals(0700, $this->dir
    ->getPermissions());
}