summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-16 13:16:10 +0200
committerJoas Schilling <coding@schilljs.com>2022-08-17 10:31:14 +0200
commit36f511d19844c1d4f661ecdf9ac01ce7d90916b8 (patch)
tree1efd08914bb741ddf046078faeb7c020bc411bef /tests
parent197c14398107c30aac46c08cce4eae8a1e1a672d (diff)
Add display name cache to SystemMessage
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Chat/Parser/SystemMessageTest.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/php/Chat/Parser/SystemMessageTest.php b/tests/php/Chat/Parser/SystemMessageTest.php
index ad9daae63..1be6afc21 100644
--- a/tests/php/Chat/Parser/SystemMessageTest.php
+++ b/tests/php/Chat/Parser/SystemMessageTest.php
@@ -948,17 +948,13 @@ class SystemMessageTest extends TestCase {
$parser = $this->getParser();
if ($validUser) {
- $user = $this->createMock(IUser::class);
- $user->expects($this->once())
- ->method('getDisplayName')
- ->willReturn($name);
$this->userManager->expects($this->once())
- ->method('get')
+ ->method('getDisplayName')
->with($uid)
- ->willReturn($user);
+ ->willReturn($name);
} else {
$this->userManager->expects($this->once())
- ->method('get')
+ ->method('getDisplayName')
->with($uid)
->willReturn(null);
$this->expectException(ParticipantNotFoundException::class);