diff options
author | Joas Schilling <coding@schilljs.com> | 2019-12-04 15:22:02 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-12-04 15:22:02 +0100 |
commit | 6004f6208531f9ff7e39799db39209d5a445555d (patch) | |
tree | 15ce762c54945fd0a0d91ae3120c892127b7ac0e /tests | |
parent | dd53fad898e8b1de75efeda094b2f0f037d8a407 (diff) | |
download | nextcloud-server-6004f6208531f9ff7e39799db39209d5a445555d.tar.gz nextcloud-server-6004f6208531f9ff7e39799db39209d5a445555d.zip |
I love unit tests that mock unnecessary stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Cache/FileCacheTest.php | 9 |
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(), '/'); |