summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/User_LDAPTest.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-03 16:35:06 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-03-03 16:35:06 +0100
commitdab5ea958a58e79b7f40b49bbe3af8839dc9c9d1 (patch)
treeba32d3a96807f5f126ce7e2fcf82d1c0796ead43 /apps/user_ldap/tests/User_LDAPTest.php
parent0c5bd588ed4528d46df244a686b6f91299766836 (diff)
downloadnextcloud-server-dab5ea958a58e79b7f40b49bbe3af8839dc9c9d1.tar.gz
nextcloud-server-dab5ea958a58e79b7f40b49bbe3af8839dc9c9d1.zip
Fix unit tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/tests/User_LDAPTest.php')
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index 3142a256c9a..b00c93e79f0 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -815,13 +815,15 @@ class User_LDAPTest extends TestCase {
private function prepareAccessForGetDisplayName() {
$this->connection->expects($this->any())
- ->method('__get')
- ->willReturnCallback(function ($name) {
- if ($name === 'ldapUserDisplayName') {
- return 'displayname';
- }
- return null;
- });
+ ->method('__get')
+ ->willReturnCallback(function ($name) {
+ if ($name === 'ldapUserDisplayName') {
+ return 'displayname';
+ } elseif ($name === 'ldapUserDisplayName2') {
+ return 'displayname2';
+ }
+ return null;
+ });
$this->access->expects($this->any())
->method('readAttribute')