You are here

public function vfsStreamWrapperTestCase::chmod in Zircon Profile 8

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

file permissions

@test @group permissions

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php, line 230

Class

vfsStreamWrapperTestCase
Test for org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function chmod() {
  $this
    ->assertEquals(40777, decoct(fileperms($this->fooURL)));
  $this
    ->assertEquals(40777, decoct(fileperms($this->fooURL . '/.')));
  $this
    ->assertEquals(40777, decoct(fileperms($this->barURL)));
  $this
    ->assertEquals(40777, decoct(fileperms($this->barURL . '/.')));
  $this
    ->assertEquals(100666, decoct(fileperms($this->baz1URL)));
  $this
    ->assertEquals(100666, decoct(fileperms($this->baz2URL)));
  $this->foo
    ->chmod(0755);
  $this->bar
    ->chmod(0700);
  $this->baz1
    ->chmod(0644);
  $this->baz2
    ->chmod(0600);
  $this
    ->assertEquals(40755, decoct(fileperms($this->fooURL)));
  $this
    ->assertEquals(40755, decoct(fileperms($this->fooURL . '/.')));
  $this
    ->assertEquals(40700, decoct(fileperms($this->barURL)));
  $this
    ->assertEquals(40700, decoct(fileperms($this->barURL . '/.')));
  $this
    ->assertEquals(100644, decoct(fileperms($this->baz1URL)));
  $this
    ->assertEquals(100600, decoct(fileperms($this->baz2URL)));
}