Fix failing unit test 💀
This commit is contained in:
parent
9ec2850c78
commit
c565a7b042
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue