summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/User_LDAPTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/tests/User_LDAPTest.php')
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index 2b5952c9742..5a165305d58 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -491,10 +491,9 @@ class User_LDAPTest extends TestCase {
private function getUsers($search = '', $limit = null, $offset = null) {
$users = \OC::$server->getUserManager()->search($search, $limit, $offset);
- $uids = [];
- foreach ($users as $user) {
- $uids[] = $user->getUID();
- }
+ $uids = array_map(function(IUser $user) {
+ return $user->getUID();
+ }, $users);
return $uids;
}
@@ -1098,7 +1097,7 @@ class User_LDAPTest extends TestCase {
$this->assertEquals('Roland Deschain', $result);
//empty displayname retrieved
- $result = \OC::$server->getUserManager()->get('newyorker')->getDisplayName();
+ $result = \OC::$server->getUserManager()->get('newyorker') === null ? 'newyorker' : \OC::$server->getUserManager()->get('newyorker')->getDisplayName();
$this->assertEquals('newyorker', $result);
}