예제 #1
0
파일: FileTest.php 프로젝트: naucon/file
 /**
  * @depends     testExist
  * @return      void
  */
 public function testChmod()
 {
     $filePath = __DIR__ . '/example.txt';
     $fileObject = new File($filePath);
     $this->assertGreaterThan(0, $mode = $fileObject->getPermission());
     $this->assertEquals(4, strlen($mode));
     $this->assertTrue($fileObject->chmod($mode));
     $fileObject->flush();
     // clear file status cache
     $this->assertEquals($mode, $fileObject->getPermission());
 }