/** * 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); }
public function tearDown() { testRemoveDirTree($this->cacheDir); unset($this->cacheDriver); }
public function tearDown() { testRemoveDirTree($this->logDir); }