diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-03 13:57:29 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-10-03 14:15:18 +0200 |
commit | bf0371429c96ac3fad637af98bceea55374cca0e (patch) | |
tree | 38117fc2a842fca84e2e24ac5e622d93b5f8923c /lib/private/AvatarManager.php | |
parent | 5dacd51c144f6262b9db583b096f5ec82c793081 (diff) | |
download | nextcloud-server-bf0371429c96ac3fad637af98bceea55374cca0e.tar.gz nextcloud-server-bf0371429c96ac3fad637af98bceea55374cca0e.zip |
Remove database requirement from test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/AvatarManager.php')
-rw-r--r-- | lib/private/AvatarManager.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/AvatarManager.php b/lib/private/AvatarManager.php index 6f1f380a903..df3247b8f00 100644 --- a/lib/private/AvatarManager.php +++ b/lib/private/AvatarManager.php @@ -91,14 +91,20 @@ class AvatarManager implements IAvatarManager { if (is_null($user)) { throw new \Exception('user does not exist'); } + // sanitize userID - fixes casing issue (needed for the filesystem stuff that is done below) $userId = $user->getUID(); /* * Fix for #22119 - * Basically we do not want to copy the skeleton folder + * Basically we do not want to copy the skeleton folder. + * + * For unit test purposes this is ignored when run in PHPUnit. */ - \OC\Files\Filesystem::initMountPoints($userId); + if(!defined('PHPUNIT_RUN')) { + \OC\Files\Filesystem::initMountPoints($userId); + } + $dir = '/' . $userId; /** @var Folder $folder */ $folder = $this->rootFolder->get($dir); |