aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/fileupload_form_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/fileupload_form_test.php')
-rw-r--r--tests/functional/fileupload_form_test.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php
index 998c402fa3..ad01d7b2df 100644
--- a/tests/functional/fileupload_form_test.php
+++ b/tests/functional/fileupload_form_test.php
@@ -22,6 +22,25 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
$this->login();
}
+ public function tearDown()
+ {
+ $iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/');
+ foreach ($iterator as $fileinfo)
+ {
+ if (
+ $fileinfo->isDot()
+ || $fileinfo->isDir()
+ || $fileinfo->getFilename() === 'index.htm'
+ || $fileinfo->getFilename() === '.htaccess'
+ )
+ {
+ continue;
+ }
+
+ unlink($fileinfo->getPathname());
+ }
+ }
+
private function upload_file($filename, $mimetype)
{
$file = array(