public function tearDown() {
if (!$this->driver) {
return;
}
$dir = $this->driver
->getDirectory();
$ext = $this->driver
->getExtension();
$iterator = new \RecursiveDirectoryIterator($dir);
foreach (new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST) as $file) {
if ($file
->isFile()) {
@unlink($file
->getRealPath());
}
else {
@rmdir($file
->getRealPath());
}
}
}