comparison 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
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
58 touch(self::toAbsolute('test.php'), strtotime('2005-10-15')); 58 touch(self::toAbsolute('test.php'), strtotime('2005-10-15'));
59 } 59 }
60 60
61 public static function tearDownAfterClass() 61 public static function tearDownAfterClass()
62 { 62 {
63 foreach (array_reverse(self::$files) as $file) { 63 $paths = new \RecursiveIteratorIterator(
64 if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) { 64 new \RecursiveDirectoryIterator(self::$tmpDir, \RecursiveDirectoryIterator::SKIP_DOTS),
65 @rmdir($file); 65 \RecursiveIteratorIterator::CHILD_FIRST
66 );
67
68 foreach ($paths as $path) {
69 if ($path->isDir()) {
70 if ($path->isLink()) {
71 @unlink($path);
72 } else {
73 @rmdir($path);
74 }
66 } else { 75 } else {
67 @unlink($file); 76 @unlink($path);
68 } 77 }
69 } 78 }
70 } 79 }
71 80
72 protected static function toAbsolute($files = null) 81 protected static function toAbsolute($files = null)