You are here

public function vfsStreamDirectoryTestCase::group 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::group()

setting and retrieving owner group of a file

@test @group permissions

File

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

Class

vfsStreamDirectoryTestCase
Test for org\bovigo\vfs\vfsStreamDirectory.

Namespace

org\bovigo\vfs

Code

public function group() {
  $this
    ->assertEquals(vfsStream::getCurrentGroup(), $this->dir
    ->getGroup());
  $this
    ->assertTrue($this->dir
    ->isOwnedByGroup(vfsStream::getCurrentGroup()));
  $this
    ->assertSame($this->dir, $this->dir
    ->chgrp(vfsStream::GROUP_USER_1));
  $this
    ->assertEquals(vfsStream::GROUP_USER_1, $this->dir
    ->getGroup());
  $this
    ->assertTrue($this->dir
    ->isOwnedByGroup(vfsStream::GROUP_USER_1));
}