diff options
author | blizzz <blizzz@owncloud.com> | 2014-10-17 12:07:27 +0200 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2014-10-17 12:07:27 +0200 |
commit | 688a141586dad961b24b364e79cd11c1aa343730 (patch) | |
tree | 1da583b0fda2dba7c012297578a4f082ba5780d3 /tests | |
parent | f1a5ebd59d5403cdae1ed60513c9feb469365d09 (diff) | |
parent | de53bee9b38a4a757d7b24d7d0e70311e07358b5 (diff) | |
download | nextcloud-server-688a141586dad961b24b364e79cd11c1aa343730.tar.gz nextcloud-server-688a141586dad961b24b364e79cd11c1aa343730.zip |
Merge pull request #9104 from macjohnny/macjohnny-drastic-ldap-speedup
drastic ldap speedup (update)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/group/manager.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/group/manager.php b/tests/lib/group/manager.php index 70d9783946a..e4b3a522767 100644 --- a/tests/lib/group/manager.php +++ b/tests/lib/group/manager.php @@ -190,7 +190,7 @@ class Manager extends \PHPUnit_Framework_TestCase { $groups = $manager->search('1'); $this->assertEquals(1, count($groups)); - $group1 = $groups[0]; + $group1 = reset($groups); $this->assertEquals('group1', $group1->getGID()); } @@ -229,8 +229,8 @@ class Manager extends \PHPUnit_Framework_TestCase { $groups = $manager->search('1'); $this->assertEquals(2, count($groups)); - $group1 = $groups[0]; - $group12 = $groups[1]; + $group1 = reset($groups); + $group12 = next($groups); $this->assertEquals('group1', $group1->getGID()); $this->assertEquals('group12', $group12->getGID()); } @@ -270,8 +270,8 @@ class Manager extends \PHPUnit_Framework_TestCase { $groups = $manager->search('1', 2, 1); $this->assertEquals(2, count($groups)); - $group1 = $groups[0]; - $group12 = $groups[1]; + $group1 = reset($groups); + $group12 = next($groups); $this->assertEquals('group1', $group1->getGID()); $this->assertEquals('group12', $group12->getGID()); } @@ -300,7 +300,7 @@ class Manager extends \PHPUnit_Framework_TestCase { $groups = $manager->getUserGroups(new User('user1', $userBackend)); $this->assertEquals(1, count($groups)); - $group1 = $groups[0]; + $group1 = reset($groups); $this->assertEquals('group1', $group1->getGID()); } @@ -340,8 +340,8 @@ class Manager extends \PHPUnit_Framework_TestCase { $groups = $manager->getUserGroups(new User('user1', $userBackend)); $this->assertEquals(2, count($groups)); - $group1 = $groups[0]; - $group2 = $groups[1]; + $group1 = reset($groups); + $group2 = next($groups); $this->assertEquals('group1', $group1->getGID()); $this->assertEquals('group2', $group2->getGID()); } @@ -727,7 +727,7 @@ class Manager extends \PHPUnit_Framework_TestCase { // check result $groups = $manager->getUserGroups($user1); $this->assertEquals(1, count($groups)); - $group1 = $groups[0]; + $group1 = reset($groups); $this->assertEquals('group1', $group1->getGID()); } @@ -768,7 +768,7 @@ class Manager extends \PHPUnit_Framework_TestCase { $user1 = new User('user1', null); $groups = $manager->getUserGroups($user1); $this->assertEquals(1, count($groups)); - $group1 = $groups[0]; + $group1 = reset($groups); $this->assertEquals('group1', $group1->getGID()); // remove user |