/**
  * @covers ../../../src/Library/Helper/Directory::chmod()
  * @FAILS
  */
 public function test_chmod()
 {
     return true;
     $this->checkNoArg('chmod');
     \Library\Helper\File::touch(self::$tmp_file);
     $logs = array();
     $this->assertTrue(\Library\Helper\Directory::chmod(self::$tmp_file, 777, false, 766, $logs));
     $this->assertEmpty($logs);
 }
Ejemplo n.º 2
0
?>
    </pre>

<h4 id="dirhelper">Library\Helper\Directory</h4>
    <pre class="code" data-language="php">
<?php 
$logs = array();
$dir = __DIR__ . '/tmp/tmp_tmp';
echo '$logs = array();' . "\n";
echo '$dir = __DIR__."/tmp/tmp_tmp";' . "\n";
\Library\Helper\Directory::ensureExists($dir);
\Library\Helper\File::touch($dir . '/test1');
\Library\Helper\File::touch($dir . '/test2');
\Library\Helper\File::touch($dir . '/test/test1');
\Library\Helper\File::touch($dir . '/test/test2');
\Library\Helper\Directory::chmod($dir, 777, true, 766, $logs);
\Library\Helper\Directory::remove($dir, $logs);
echo "\n";
echo '\\Library\\Helper\\Directory::ensureExists($dir);' . "\n";
echo '\\Library\\Helper\\File::touch($dir."/test1");' . "\n";
echo '\\Library\\Helper\\File::touch($dir."/test2");' . "\n";
echo '\\Library\\Helper\\File::touch($dir."/test/test1");' . "\n";
echo '\\Library\\Helper\\File::touch($dir."/test/test2");' . "\n";
echo '\\Library\\Helper\\Directory::chmod($dir, 777, true, 766, $logs);' . "\n";
echo '\\Library\\Helper\\Directory::remove($dir, $logs);' . "\n";
echo "\n";
echo 'var_export($logs);' . "\n";
var_export($logs);
?>
    </pre>