aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-25 20:42:38 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-26 11:16:23 +0200
commit74f0e3723327fbfb1cd7a96865019ff791b41593 (patch)
tree76df4b982e0c8689f0a74528299be8822263f2e6 /apps/user_ldap/tests
parent7ebd96416ca9150a4d524547a18b5fce269016ca (diff)
downloadnextcloud-server-74f0e3723327fbfb1cd7a96865019ff791b41593.tar.gz
nextcloud-server-74f0e3723327fbfb1cd7a96865019ff791b41593.zip
Remove deprecated \OCP\User::userExists
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/user_ldap/tests')
-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);
}