We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b30fdb7 commit 562262cCopy full SHA for 562262c
Tests/Iterator/RealIteratorTestCase.php
@@ -60,11 +60,23 @@ public static function setUpBeforeClass()
60
61
public static function tearDownAfterClass()
62
{
63
- foreach (array_reverse(self::$files) as $file) {
64
- if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) {
65
- @rmdir($file);
+ $paths = new \RecursiveIteratorIterator(
+ new \RecursiveDirectoryIterator(
+ self::$tmpDir,
66
+ \RecursiveDirectoryIterator::SKIP_DOTS
67
+ ),
68
+ \RecursiveIteratorIterator::CHILD_FIRST
69
+ );
70
+
71
+ foreach ($paths as $path) {
72
+ if ($path->isDir()) {
73
+ if ($path->isLink()) {
74
+ @unlink($path);
75
+ } else {
76
+ @rmdir($path);
77
+ }
78
} else {
- @unlink($file);
79
80
}
81
82
0 commit comments