[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()
|
public static function tearDownAfterClass()
|
||||||
{
|
{
|
||||||
foreach (array_reverse(self::$files) as $file) {
|
$paths = new \RecursiveIteratorIterator(
|
||||||
if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) {
|
new \RecursiveDirectoryIterator(
|
||||||
@rmdir($file);
|
self::$tmpDir,
|
||||||
|
\RecursiveDirectoryIterator::SKIP_DOTS
|
||||||
|
),
|
||||||
|
\RecursiveIteratorIterator::CHILD_FIRST
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($paths as $path) {
|
||||||
|
if ($path->isDir()) {
|
||||||
|
if ($path->isLink()) {
|
||||||
|
@unlink($path);
|
||||||
|
} else {
|
||||||
|
@rmdir($path);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
@unlink($file);
|
@unlink($path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user