function tearDown() { try { parent::tearDown(); } finally { $this->deleteRecursive($this->tempPath); } }
function tearDown() { try { parent::tearDown(); } finally { $dir = new \RecursiveDirectoryIterator($this->basePath); foreach (new \RecursiveIteratorIterator($dir, \RecursiveIteratorIterator::CHILD_FIRST) as $i) { if ($i->getFilename() == '.' || $i->getFilename() == '..') { continue; } if ($i->isDir()) { rmdir($i->getPathname()); } else { unlink($i->getPathname()); } } rmdir($this->basePath); } }