diff options
author | blizzz <blizzz@owncloud.com> | 2014-10-17 23:57:00 +0200 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2014-10-17 23:57:00 +0200 |
commit | 2b6281fc9d19f6b516d745386aafc64d3c610668 (patch) | |
tree | 4602ecdd0aaace98c96ca378bb99362ad8a9b0ce /tests/lib/group/manager.php | |
parent | 9aa809debf44a5b1f125fe3f32162235230eaae5 (diff) | |
parent | 7ff7a49f3d4913b3165ca7148e089eae8574b27b (diff) | |
download | nextcloud-server-2b6281fc9d19f6b516d745386aafc64d3c610668.tar.gz nextcloud-server-2b6281fc9d19f6b516d745386aafc64d3c610668.zip |
Merge pull request #11494 from owncloud/fix-ldap-ingroup-for-9225-2
fix retrieval of group members and cache group members
Diffstat (limited to 'tests/lib/group/manager.php')
-rw-r--r-- | tests/lib/group/manager.php | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/tests/lib/group/manager.php b/tests/lib/group/manager.php index e4b3a522767..8fd19513c0a 100644 --- a/tests/lib/group/manager.php +++ b/tests/lib/group/manager.php @@ -369,15 +369,6 @@ class Manager extends \PHPUnit_Framework_TestCase { } })); - $backend->expects($this->once()) - ->method('implementsActions') - ->will($this->returnValue(true)); - - $backend->expects($this->once()) - ->method('countUsersInGroup') - ->with('testgroup', '') - ->will($this->returnValue(2)); - /** * @var \OC\User\Manager $userManager */ @@ -496,9 +487,9 @@ class Manager extends \PHPUnit_Framework_TestCase { ->with('testgroup') ->will($this->returnValue(true)); - $backend->expects($this->any()) - ->method('InGroup') - ->will($this->returnCallback(function($uid, $gid) { + $backend->expects($this->any()) + ->method('inGroup') + ->will($this->returnCallback(function($uid) { switch($uid) { case 'user1' : return false; case 'user2' : return true; @@ -521,9 +512,12 @@ class Manager extends \PHPUnit_Framework_TestCase { ->with('user3') ->will($this->returnCallback(function($search, $limit, $offset) use ($userBackend) { switch($offset) { - case 0 : return array('user3' => new User('user3', $userBackend), - 'user33' => new User('user33', $userBackend)); - case 2 : return array('user333' => new User('user333', $userBackend)); + case 0 : + return array( + 'user3' => new User('user3', $userBackend), + 'user33' => new User('user33', $userBackend), + 'user333' => new User('user333', $userBackend) + ); } })); |