Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-12-04 17:22:02 +0300
committerJoas Schilling <coding@schilljs.com>2019-12-04 17:22:02 +0300
commit6004f6208531f9ff7e39799db39209d5a445555d (patch)
tree15ce762c54945fd0a0d91ae3120c892127b7ac0e /tests/lib/Cache
parentdd53fad898e8b1de75efeda094b2f0f037d8a407 (diff)
I love unit tests that mock unnecessary stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Cache')
-rw-r--r--tests/lib/Cache/FileCacheTest.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php
index 26306458d83..450bdf607b3 100644
--- a/tests/lib/Cache/FileCacheTest.php
+++ b/tests/lib/Cache/FileCacheTest.php
@@ -95,6 +95,15 @@ class FileCacheTest extends TestCache {
\OC_User::setUserId($this->user);
\OC::$server->getConfig()->setSystemValue('cachedirectory', $this->datadir);
+ if ($this->instance) {
+ $this->instance->clear();
+ $this->instance = null;
+ }
+
+ //tear down the users dir aswell
+ $user = \OC::$server->getUserManager()->get('test');
+ $user->delete();
+
// Restore the original mount point
\OC\Files\Filesystem::clearMounts();
\OC\Files\Filesystem::mount($this->storage, array(), '/');