You are here

public function vfsStreamFileTestCase::permissionsSet in Zircon Profile 8.0

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

setting and retrieving permissions for a file

@test @group permissions

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php, line 214

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

public function permissionsSet() {
  $this->file = new vfsStreamFile('foo', 0644);
  $this
    ->assertEquals(0644, $this->file
    ->getPermissions());
  $this
    ->assertSame($this->file, $this->file
    ->chmod(0600));
  $this
    ->assertEquals(0600, $this->file
    ->getPermissions());
}