]> source.dussan.org Git - nextcloud-server.git/commitdiff
no warnings within unlinkDir() within the TestCleanupListener
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 13 Jan 2014 14:32:11 +0000 (15:32 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 13 Jan 2014 14:32:11 +0000 (15:32 +0100)
tests/testcleanuplistener.php

index 368ea7bc8f4f851087d557d5356486dee473d607..a969ece6dd579e3bd8079853459e95865992cb44 100644 (file)
@@ -58,7 +58,7 @@ class TestCleanupListener implements PHPUnit_Framework_TestListener {
        }
 
        private function unlinkDir($dir) {
-               if ($dh = opendir($dir)) {
+               if ($dh = @opendir($dir)) {
                        while (($file = readdir($dh)) !== false) {
                                if ($file === '..' || $file === '.') {
                                        continue;
@@ -68,12 +68,12 @@ class TestCleanupListener implements PHPUnit_Framework_TestListener {
                                        $this->unlinkDir($path);
                                }
                                else {
-                                       unlink($path);
+                                       @unlink($path);
                                }
                        }
                        closedir($dh);
                }
-               rmdir($dir);
+               @rmdir($dir);
        }
 
        private function cleanStrayDataFiles() {