diff options
Diffstat (limited to 'tests/lib/Comments/FakeManager.php')
-rw-r--r-- | tests/lib/Comments/FakeManager.php | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/tests/lib/Comments/FakeManager.php b/tests/lib/Comments/FakeManager.php index 2434945762c..15efed5e7dc 100644 --- a/tests/lib/Comments/FakeManager.php +++ b/tests/lib/Comments/FakeManager.php @@ -1,7 +1,13 @@ <?php +/** + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only + */ namespace Test\Comments; +use OC\Comments\Comment; use OCP\Comments\IComment; use OCP\Comments\ICommentsManager; use OCP\IUser; @@ -21,7 +27,7 @@ class FakeManager implements ICommentsManager { $objectId, $limit = 0, $offset = 0, - \DateTime $notOlderThan = null + ?\DateTime $notOlderThan = null, ) { } @@ -31,12 +37,26 @@ class FakeManager implements ICommentsManager { int $lastKnownCommentId, string $sortDirection = 'asc', int $limit = 30, - bool $includeLastKnown = false + bool $includeLastKnown = false, + string $topmostParentId = '', ): array { return []; } - public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '') { + public function getCommentsWithVerbForObjectSinceComment( + string $objectType, + string $objectId, + array $verbs, + int $lastKnownCommentId, + string $sortDirection = 'asc', + int $limit = 30, + bool $includeLastKnown = false, + string $topmostParentId = '', + ): array { + return []; + } + + public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = '') { } public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array { @@ -49,6 +69,22 @@ class FakeManager implements ICommentsManager { public function delete($id) { } + public function getReactionComment(int $parentId, string $actorType, string $actorId, string $reaction): IComment { + return new Comment(); + } + + public function retrieveAllReactions(int $parentId): array { + return []; + } + + public function retrieveAllReactionsWithSpecificReaction(int $parentId, string $reaction): array { + return []; + } + + public function supportReactions(): bool { + return false; + } + public function save(IComment $comment) { } @@ -101,6 +137,10 @@ class FakeManager implements ICommentsManager { return 0; } + public function getNumberOfCommentsWithVerbsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, array $verbs): int { + return 0; + } + public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int { return 0; } @@ -108,4 +148,8 @@ class FakeManager implements ICommentsManager { public function getLastCommentDateByActor(string $objectType, string $objectId, string $verb, string $actorType, array $actors): array { return []; } + + public function deleteCommentsExpiredAtObject(string $objectType, string $objectId = ''): bool { + return true; + } } |