mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10941] Modified tearDown to use DirectoryIterator instead of glob
PHPBB3-10941
This commit is contained in:
parent
ae9b642b81
commit
f470eee8ab
1 changed files with 7 additions and 2 deletions
|
@ -83,9 +83,14 @@ class phpbb_filespec_test extends phpbb_test_case
|
||||||
$this->config = array();
|
$this->config = array();
|
||||||
$user = null;
|
$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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue