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
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-05 12:30:00 +0300
committerGitHub <noreply@github.com>2019-12-05 12:30:00 +0300
commit04c2b5fcb12a8553913381b05204e8c4b55e71b5 (patch)
tree51a950fb23f931740b24c58c969a77547794bf94 /tests
parent6f540fc09d181ffffb3f698260fdda39a8c58843 (diff)
parent6004f6208531f9ff7e39799db39209d5a445555d (diff)
Merge pull request #18130 from nextcloud/bugfix/noid/prevent-creating-users-with-existing-files
Prevent creating users with existing files
Diffstat (limited to 'tests')
-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(), '/');