public function tearDown()
{
// Restore the is_apache global in-case it was messed with in the test
global $is_apache;
if (isset($this->is_apache)) {
$is_apache = $this->is_apache;
}
if (file_exists($this->path->get_default_path())) {
chmod($this->path->get_default_path(), 0755);
}
chmod(dirname($this->path->get_default_path()), 0755);
// Remove all backup paths that exist
foreach ($this->path->get_existing_paths() as $path) {
rmdirtree($path);
}
// Remove our custom path
rmdirtree($this->custom_path);
// Reset the path internally
$this->path->reset_path();
}