summaryrefslogtreecommitdiffstats
path: root/tests/lib/cache/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/cache/file.php')
-rw-r--r--tests/lib/cache/file.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php
index 0e19c105cd1..8cc45c85405 100644
--- a/tests/lib/cache/file.php
+++ b/tests/lib/cache/file.php
@@ -23,8 +23,12 @@
namespace Test\Cache;
class FileCache extends \Test_Cache {
+ /** @var string */
private $user;
+ /** @var string */
private $datadir;
+ /** @var \OC\Files\Storage\Storage */
+ private $storage;
function skip() {
//$this->skipUnless(OC_User::isLoggedIn());
@@ -42,6 +46,7 @@ class FileCache extends \Test_Cache {
//}
//set up temporary storage
+ $this->storage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::clearMounts();
$storage = new \OC\Files\Storage\Temporary(array());
\OC\Files\Filesystem::mount($storage,array(),'/');
@@ -68,5 +73,11 @@ class FileCache extends \Test_Cache {
public function tearDown() {
\OC_User::setUserId($this->user);
\OC_Config::setValue('cachedirectory', $this->datadir);
+
+ // Restore the original mount point
+ \OC\Files\Filesystem::clearMounts();
+ \OC\Files\Filesystem::mount($this->storage, array(), '/');
+
+ parent::tearDown();
}
}