Пример #1
0
 /**
  * @depends     testExist
  * @return      void
  */
 public function testChown()
 {
     $filePath = __DIR__ . '/example.txt';
     $fileObject = new File($filePath);
     $this->assertGreaterThanOrEqual(0, $userId = $fileObject->getOwner());
     $this->assertGreaterThanOrEqual(0, strlen($user = $fileObject->getOwnerName()));
     $this->assertTrue($fileObject->chown($userId));
     $this->assertTrue($fileObject->chown($user));
     $this->assertEquals($userId, $fileObject->getOwner());
     $this->assertEquals($user, $fileObject->getOwnerName());
 }