summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/User/UserTest.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-07-03 22:25:03 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-07-05 17:13:43 +0200
commit92a082d82364e86b43beed5911e22e65a3f0883f (patch)
treeb1ff95264b1a972bea01ceb9568ab8f61bea2659 /apps/user_ldap/tests/User/UserTest.php
parentc3dcd70b91ecc38ee73b29966dafd960fc1e8576 (diff)
downloadnextcloud-server-92a082d82364e86b43beed5911e22e65a3f0883f.tar.gz
nextcloud-server-92a082d82364e86b43beed5911e22e65a3f0883f.zip
fix(ldap): avatar is not being fetched
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests/User/UserTest.php')
-rw-r--r--apps/user_ldap/tests/User/UserTest.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 470b0829868..23ce407dfd7 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -585,9 +585,17 @@ class UserTest extends \Test\TestCase {
$avatar = $this->createMock(IAvatar::class);
$avatar->expects($this->never())
->method('set');
+ $avatar->expects($this->any())
+ ->method('exists')
+ ->willReturn(true);
+ $avatar->expects($this->any())
+ ->method('isCustomAvatar')
+ ->willReturn(true);
- $this->avatarManager->expects($this->never())
- ->method('getAvatar');
+ $this->avatarManager->expects($this->any())
+ ->method('getAvatar')
+ ->with($this->uid)
+ ->willReturn($avatar);
$this->connection->expects($this->any())
->method('resolveRule')