예제 #1
0
파일: FileTest.php 프로젝트: naucon/file
 /**
  * @depends     testExist
  * @return      void
  */
 public function testChgrp()
 {
     $filePath = __DIR__ . '/example.txt';
     $fileObject = new File($filePath);
     $this->assertGreaterThanOrEqual(0, $userGroupId = $fileObject->getGroup());
     $this->assertGreaterThanOrEqual(0, strlen($userGroup = $fileObject->getGroupName()));
     if ($userGroupId > 0) {
         $this->assertTrue($fileObject->chgrp($userGroupId));
         $this->assertTrue($fileObject->chgrp($userGroup));
         $this->assertEquals($userGroupId, $fileObject->getGroup());
         $this->assertEquals($userGroup, $fileObject->getGroupName());
     }
 }