Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-07-02 16:38:38 +0300
committerJoas Schilling <coding@schilljs.com>2021-07-02 16:54:47 +0300
commitca8a3516b36beec9c3d5acf5fb577d28236ec366 (patch)
treed7108a98ab5082c7c59cabd206a0310f14a60a93 /tests
parent127b54fe57e9c6ea2ba4a19a90bc9531aad3ae7e (diff)
Use memcache to save the query for unread message count
For a given message id $lastReadMessage we cache the number of messages that exist past that message, which happen to also be the number of unread messages, because this is expensive to query per room and user repeatedly Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Chat/ChatManagerTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/php/Chat/ChatManagerTest.php b/tests/php/Chat/ChatManagerTest.php
index 3a4396a57..6bf7447ef 100644
--- a/tests/php/Chat/ChatManagerTest.php
+++ b/tests/php/Chat/ChatManagerTest.php
@@ -321,7 +321,7 @@ class ChatManagerTest extends TestCase {
public function testGetUnreadCount() {
/** @var Room|MockObject $chat */
$chat = $this->createMock(Room::class);
- $chat->expects($this->once())
+ $chat->expects($this->atLeastOnce())
->method('getId')
->willReturn(23);