public function vfsStreamWrapperTestCase::chgrp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php \org\bovigo\vfs\vfsStreamWrapperTestCase::chgrp()
@test @group issue_11 @group permissions
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperTestCase.php, line 353
Class
Namespace
org\bovigo\vfsCode
public function chgrp() {
if (version_compare(phpversion(), '5.4.0', '<')) {
$this->foo
->chgrp(vfsStream::GROUP_USER_1);
$this->bar
->chgrp(vfsStream::GROUP_USER_1);
$this->baz1
->chgrp(vfsStream::GROUP_USER_2);
$this->baz2
->chgrp(vfsStream::GROUP_USER_2);
}
else {
chgrp($this->fooURL, vfsStream::GROUP_USER_1);
chgrp($this->barURL, vfsStream::GROUP_USER_1);
chgrp($this->baz1URL, vfsStream::GROUP_USER_2);
chgrp($this->baz2URL, vfsStream::GROUP_USER_2);
}
$this
->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL));
$this
->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL . '/.'));
$this
->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL));
$this
->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL . '/.'));
$this
->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz1URL));
$this
->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz2URL));
}