public function tearDown() {
$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());
}
}
}