summaryrefslogtreecommitdiffstats
path: root/tests/lib/Comments/FakeManager.php
blob: b524f5a5000650bb3bb04470781a1f035a714b81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?php

namespace Test\Comments;

use OC\Comments\Comment;
use OCP\Comments\IComment;
use OCP\Comments\ICommentsManager;
use OCP\IUser;

/**
 * Class FakeManager
 */
class FakeManager implements ICommentsManager {
	public function get($id) {
	}

	public function getTree($id, $limit = 0, $offset = 0) {
	}

	public function getForObject(
		$objectType,
		$objectId,
		$limit = 0,
		$offset = 0,
		\DateTime $notOlderThan = null
	) {
	}

	public function getForObjectSince(
		string $objectType,
		string $objectId,
		int $lastKnownCommentId,
		string $sortDirection = 'asc',
		int $limit = 30,
		bool $includeLastKnown = false
	): array {
		return [];
	}

	public function getCommentsWithVerbForObjectSinceComment(
		string $objectType,
		string $objectId,
		array $verbs,
		int $lastKnownCommentId,
		string $sortDirection = 'asc',
		int $limit = 30,
		bool $includeLastKnown = false
	): 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 {
		return [];
	}

	public function create($actorType, $actorId, $objectType, $objectId) {
	}

	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) {
	}

	public function deleteReferencesOfActor($actorType, $actorId) {
	}

	public function deleteCommentsAtObject($objectType, $objectId) {
	}

	public function setReadMark($objectType, $objectId, \DateTime $dateTime, IUser $user) {
	}

	public function getReadMark($objectType, $objectId, IUser $user) {
	}

	public function deleteReadMarksFromUser(IUser $user) {
	}

	public function deleteReadMarksOnObject($objectType, $objectId) {
	}

	public function registerEventHandler(\Closure $closure) {
	}

	public function registerDisplayNameResolver($type, \Closure $closure) {
	}

	public function resolveDisplayName($type, $id) {
	}

	public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user) {
	}

	public function getNumberOfUnreadCommentsForObjects(string $objectType, array $objectIds, IUser $user, $verb = ''): array {
		return [];
	}


	public function getActorsInTree($id) {
	}

	public function load(): void {
	}

	public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array {
		return [];
	}

	public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int {
		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;
	}

	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;
	}
}