Ejemplo n.º 1
0
/**
 * Tlumx Framework (http://framework.tlumx.xyz/)
 *
 * @author    Yaroslav Kharitonchuk <*****@*****.**>
 * @link      https://github.com/tlumx/framework
 * @copyright Copyright (c) 2016 Yaroslav Kharitonchuk
 * @license   http://framework.tlumx.xyz/license  (MIT License)
 */
function testRemoveDirTree($dir)
{
    if (!file_exists($dir)) {
        return;
    }
    $files = array_diff(scandir($dir), array('.', '..'));
    foreach ($files as $file) {
        is_dir("{$dir}/{$file}") ? testRemoveDirTree("{$dir}/{$file}") : unlink("{$dir}/{$file}");
    }
    return rmdir($dir);
}
Ejemplo n.º 2
0
 public function tearDown()
 {
     testRemoveDirTree($this->cacheDir);
     unset($this->cacheDriver);
 }
Ejemplo n.º 3
0
 public function tearDown()
 {
     testRemoveDirTree($this->logDir);
 }