You are here

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

setting and retrieving owner group of a file

@test @group permissions

File

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

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

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