Skip to content

Commit 5e4e376

Browse files
committed
fixup! fixup! test(files_sharing): add tests for fetching remote avatars
1 parent e4b4ee0 commit 5e4e376

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/lib/Avatar/RemoteAvatarTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
5-
* SPDX-License-Identifier: AGPL-3.0-only
5+
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

88
declare(strict_types=1);
@@ -120,7 +120,8 @@ public function testGetFileFetchesAvatarFromCache(): void {
120120
$expectedFile = $this->createMock(ISimpleFile::class);
121121
$expectedFile->expects($this->once())->method('getContent')->willReturn($fileContents);
122122
$expectedFile->expects($this->once())->method('getMTime')->willReturn(time() + (60 * 60 * 24));
123-
$this->folder->expects($this->once())->method('getFile')->with('avatar.64.png')->willReturn($expectedFile);
123+
$expectedFile->expects($this->once())->method('getName')->willReturn('avatar.64.png');
124+
$this->folder->expects($this->once())->method('getDirectoryListing')->willReturn([$expectedFile]);
124125

125126
$this->clientService->expects($this->never())->method('newClient');
126127

0 commit comments

Comments
 (0)