[Finder] Update RealIteratorTestCase
This commit is contained in:
parent
ec6b941738
commit
7d0ebd41ab
@ -60,11 +60,23 @@ abstract class RealIteratorTestCase extends IteratorTestCase
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
foreach (array_reverse(self::$files) as $file) {
|
||||
if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) {
|
||||
@rmdir($file);
|
||||
$paths = new \RecursiveIteratorIterator(
|
||||
new \RecursiveDirectoryIterator(
|
||||
self::$tmpDir,
|
||||
\RecursiveDirectoryIterator::SKIP_DOTS
|
||||
),
|
||||
\RecursiveIteratorIterator::CHILD_FIRST
|
||||
);
|
||||
|
||||
foreach ($paths as $path) {
|
||||
if ($path->isDir()) {
|
||||
if ($path->isLink()) {
|
||||
@unlink($path);
|
||||
} else {
|
||||
@rmdir($path);
|
||||
}
|
||||
} else {
|
||||
@unlink($file);
|
||||
@unlink($path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user