diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-09-22 23:37:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 23:37:55 +0300 |
commit | 618280a46293b799c6f8700982bbbc09a631707a (patch) | |
tree | cafd1da0b8e16bde76a3717e3d3bca3e4351d6e2 /tests | |
parent | 5bd5779d356907e9c7ab3de6ad4bbdecb5857c94 (diff) | |
parent | 86d06fab3189ba3fff35730e5502ff2291b8cf91 (diff) |
Merge pull request #4187 from nextcloud/feature/4184/cache-the-last-message-id
Cache the last msg id of a chat in MemoryCache to save O(n) queries p…
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Chat/ChatManagerTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/php/Chat/ChatManagerTest.php b/tests/php/Chat/ChatManagerTest.php index 73eda94aa..b3684e1ec 100644 --- a/tests/php/Chat/ChatManagerTest.php +++ b/tests/php/Chat/ChatManagerTest.php @@ -33,11 +33,15 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\IComment; use OCP\Comments\ICommentsManager; use OCP\EventDispatcher\IEventDispatcher; +use OCP\ICacheFactory; use OCP\IUser; use OCP\Notification\IManager as INotificationManager; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; +/** + * @group DB + */ class ChatManagerTest extends TestCase { /** @var CommentsManager|ICommentsManager|MockObject */ @@ -61,12 +65,15 @@ class ChatManagerTest extends TestCase { $this->notificationManager = $this->createMock(INotificationManager::class); $this->notifier = $this->createMock(Notifier::class); $this->timeFactory = $this->createMock(ITimeFactory::class); + $cacheFactory = $this->createMock(ICacheFactory::class); $this->chatManager = new ChatManager( $this->commentsManager, $this->dispatcher, + \OC::$server->getDatabaseConnection(), $this->notificationManager, $this->notifier, + $cacheFactory, $this->timeFactory ); } |