aboutsummaryrefslogtreecommitdiffstats
path: root/tests/upload/filespec_test.php
diff options
context:
space:
mode:
authorFyorl <gaelreth@gmail.com>2012-07-09 01:55:11 +0100
committerFyorl <gaelreth@gmail.com>2012-07-09 14:08:21 +0100
commitf470eee8abb18fffa834797300f458c1b6478937 (patch)
tree6fd68ab0a2c700ad32e81ba4164facd1923bf19e /tests/upload/filespec_test.php
parentae9b642b815dce164d0675eee89627f63da97eaf (diff)
downloadforums-f470eee8abb18fffa834797300f458c1b6478937.tar
forums-f470eee8abb18fffa834797300f458c1b6478937.tar.gz
forums-f470eee8abb18fffa834797300f458c1b6478937.tar.bz2
forums-f470eee8abb18fffa834797300f458c1b6478937.tar.xz
forums-f470eee8abb18fffa834797300f458c1b6478937.zip
[ticket/10941] Modified tearDown to use DirectoryIterator instead of glob
PHPBB3-10941
Diffstat (limited to 'tests/upload/filespec_test.php')
-rw-r--r--tests/upload/filespec_test.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index fc6409999f..5d75b5fabd 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -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());
+ }
}
}