diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-18 23:52:34 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-08-19 10:48:32 +0200 |
commit | 7e1177819023a185480b5251e3a22dc429948518 (patch) | |
tree | 66288b17692cfcdde3e3273051e00224b4167b1f /apps/files/tests | |
parent | cab0f1327e28104ef61e8767f963d20cf38544af (diff) | |
download | nextcloud-server-7e1177819023a185480b5251e3a22dc429948518.tar.gz nextcloud-server-7e1177819023a185480b5251e3a22dc429948518.zip |
Use user name cache in activity providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/Activity/ProviderTest.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php index 7c5bdf27ba1..3566d83f415 100644 --- a/apps/files/tests/Activity/ProviderTest.php +++ b/apps/files/tests/Activity/ProviderTest.php @@ -177,17 +177,10 @@ class ProviderTest extends TestCase { $provider = $this->getProvider(); if ($userDisplayName !== null) { - $user = $this->createMock(IUser::class); - $user->expects($this->once()) - ->method('getUID') - ->willReturn($uid); - $user->expects($this->once()) - ->method('getDisplayName') - ->willReturn($userDisplayName); $this->userManager->expects($this->once()) - ->method('get') + ->method('getDisplayName') ->with($uid) - ->willReturn($user); + ->willReturn($userDisplayName); } if ($cloudIdData !== null) { $this->cloudIdManager->expects($this->once()) |