From c565a7b0429be19e98e42599c8ab7b6e4a46dc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu> Date: Thu, 19 Nov 2015 16:20:27 +0100 Subject: [PATCH] Fix failing unit test :skull: --- lib/private/util.php | 2 +- tests/lib/util.php | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/private/util.php b/lib/private/util.php index 8e3a030251..e48cdd4d9f 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -237,7 +237,7 @@ class OC_Util { $newValue = json_encode($excludedGroups); $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); } - $usersGroups = $groupManager->getUserGroups($user); + $usersGroups = $groupManager->getUserGroupIds($user); if (!empty($usersGroups)) { $remainingGroups = array_diff($usersGroups, $excludedGroups); // if the user is only in groups which are disabled for sharing then diff --git a/tests/lib/util.php b/tests/lib/util.php index cb575976f3..a328b1923e 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -306,24 +306,10 @@ class Test_Util extends \Test\TestCase { $groupManager ->expects($this->at(0)) - ->method('getUserGroups') + ->method('getUserGroupIds') ->with($user) ->will($this->returnValue($membership)); -// $uid = "user1"; -// \OC_User::setUserId($uid); -// -// \OC_User::createUser($uid, "passwd"); -// -// foreach ($groups as $group) { -// \OC_Group::createGroup($group); -// } -// -// foreach ($membership as $group) { -// \OC_Group::addToGroup($uid, $group); -// } -// - $result = \OC_Util::isSharingDisabledForUser($config, $groupManager, $user); $this->assertSame($expected, $result); -- GitLab