summaryrefslogtreecommitdiffstats
path: root/tests/lib/files/cache/updaterlegacy.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/files/cache/updaterlegacy.php')
-rw-r--r--tests/lib/files/cache/updaterlegacy.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/lib/files/cache/updaterlegacy.php b/tests/lib/files/cache/updaterlegacy.php
index c80c3168ad6..d16a062fcca 100644
--- a/tests/lib/files/cache/updaterlegacy.php
+++ b/tests/lib/files/cache/updaterlegacy.php
@@ -29,6 +29,9 @@ class UpdaterLegacy extends \PHPUnit_Framework_TestCase {
*/
private $cache;
+ /** @var \OC\Files\Storage\Storage */
+ private $originalStorage;
+
private static $user;
public function setUp() {
@@ -51,7 +54,8 @@ class UpdaterLegacy extends \PHPUnit_Framework_TestCase {
$this->scanner->scan('');
$this->cache = $this->storage->getCache();
- \OC\Files\Filesystem::tearDown();
+ $this->originalStorage = Filesystem::getStorage('/');
+ Filesystem::tearDown();
if (!self::$user) {
self::$user = uniqid();
}
@@ -59,7 +63,7 @@ class UpdaterLegacy extends \PHPUnit_Framework_TestCase {
\OC_User::createUser(self::$user, 'password');
\OC_User::setUserId(self::$user);
- \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
+ Filesystem::init(self::$user, '/' . self::$user . '/files');
Filesystem::clearMounts();
Filesystem::mount($this->storage, array(), '/' . self::$user . '/files');
@@ -74,6 +78,7 @@ class UpdaterLegacy extends \PHPUnit_Framework_TestCase {
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
Filesystem::tearDown();
+ Filesystem::mount($this->originalStorage, array(), '/');
// reset app files_encryption
if ($this->stateFilesEncryption) {
\OC_App::enable('files_encryption');