aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/files/filesystem.php1
-rw-r--r--tests/lib/files/cache/updater.php9
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index c0e9d215fb5..edd37d7b468 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -311,6 +311,7 @@ class Filesystem {
*/
static public function tearDown() {
self::clearMounts();
+ self::$defaultInstance = null;
}
/**
diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php
index aaf932c97fe..dad3cd7e650 100644
--- a/tests/lib/files/cache/updater.php
+++ b/tests/lib/files/cache/updater.php
@@ -42,14 +42,11 @@ class Updater extends \PHPUnit_Framework_TestCase {
$this->scanner->scan('');
$this->cache = $this->storage->getCache();
+ \OC\Files\Filesystem::tearDown();
if (!self::$user) {
- if (!\OC\Files\Filesystem::getView()) {
- self::$user = uniqid();
- \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
- } else {
- self::$user = \OC_User::getUser();
- }
+ self::$user = uniqid();
}
+ \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
Filesystem::clearMounts();
Filesystem::mount($this->storage, array(), '/' . self::$user . '/files');