Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php Thu Apr 26 11:26:54 2018 +0100 +++ b/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php Tue Jul 10 15:07:59 2018 +0100 @@ -60,11 +60,20 @@ 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); } } }