[ticket/10941] Modified tearDown to use DirectoryIterator instead of glob

PHPBB3-10941
This commit is contained in:
Fyorl 2012-07-09 01:55:11 +01:00
parent ae9b642b81
commit f470eee8ab

View file

@ -83,9 +83,14 @@ class phpbb_filespec_test extends phpbb_test_case
$this->config = array();
$user = null;
foreach (glob($this->path . 'copies/*') as $file)
$iterator = new DirectoryIterator($this->path . 'copies');
foreach ($iterator as $fileinfo)
{
unlink($file);
$name = $fileinfo->getFilename();
if ($name[0] !== '.')
{
unlink($fileinfo->getPathname());
}
}
}