public function setUp() { $this->_root = FS::clean(__DIR__ . '/test', '/'); FS::rmdir($this->_root); mkdir($this->_root, 0777, true); $this->_paths = array($this->_root, $this->_root . DS . 'folder'); }
protected function setUp() { $_SERVER['HTTP_HOST'] = 'example.com'; $_SERVER['SERVER_PORT'] = '80'; FS::rmdir(PROJECT_ROOT . '/cache'); FS::rmdir(PROJECT_ROOT . '/tests/cache'); }
public function setUp() { $root = FS::clean(__DIR__ . '/test', '/'); FS::rmdir($root); mkdir($root, 0777, true); $this->_root = $root; }
protected function setUp() { parent::setUp(); if (!class_exists('\\JBZoo\\Utils\\FS')) { throw new Exception('jbzoo/utils required for CovCatcher unit-tests'); } FS::rmdir(PROJECT_BUILD . '/coverage_cov'); FS::rmdir(PROJECT_BUILD . '/coverage_html'); FS::rmdir(PROJECT_BUILD . '/coverage_xml'); }
protected function setUp() { parent::setUp(); if (!class_exists('\\JBZoo\\Utils\\Sys')) { throw new Exception('jbzoo/utils required for HttpServer unit-tests'); } if (!class_exists('\\JBZoo\\HttpClient\\HttpClient')) { throw new Exception('jbzoo/http-client required for HttpServer unit-tests'); } if (Sys::isPHP53() || Sys::isHHVM()) { skip('PHP 5.3.x/7.0/hhvm doen\'t support built-in web-server'); } FS::rmdir(PROJECT_BUILD . '/coverage_cov'); FS::rmdir(PROJECT_BUILD . '/coverage_html'); FS::rmdir(PROJECT_BUILD . '/coverage_xml'); }
public function testLS() { $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'dir1'; @mkdir($dir); $file1 = $dir . DIRECTORY_SEPARATOR . 'file1'; touch($file1); is(array($file1), FS::ls($dir)); FS::rmdir($dir); }