Exemplo n.º 1
0
Arquivo: DirTest.php Projeto: jasny/Q
 /**
  * Tests Fs_Node->create() with existing file
  */
 public function testCreate_Recursive()
 {
     if (function_exists('posix_getuid') && posix_getuid() == 0) {
         $this->markTestSkipped("Won't test this as root for safety reasons.");
     }
     $filename = "{$this->file}.y/" . basename($this->file);
     $new = new Fs_Dir($filename);
     umask(022);
     $new->create(0770, Fs::RECURSIVE);
     $this->assertTrue(is_dir($filename));
     $this->assertEquals('0750', sprintf('%04o', fileperms($filename) & 0777));
     $this->assertEquals('0750', sprintf('%04o', fileperms(dirname($filename)) & 0777));
 }