3 * @copyright Copyright (C) 2010-2021, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 use Friendica\Core\Protocol;
23 use Friendica\Model\Contact;
24 use Friendica\Model\Item;
25 use Friendica\Model\Notification;
36 // Base test config to avoid notice messages
41 'v' => 'http://localhost',
50 'k' => 'worker_dont_fork',
55 'k' => 'curl_timeout',
67 'username' => 'Test user',
68 'nickname' => 'selfcontact',
70 'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
108 'uri' => 'http://localhost/profile/selfcontact',
113 'uri' => 'http://localhost/profile/othercontact',
118 'uri' => 'http://localhost/profile/friendcontact',
123 'uri' => 'http://localhost/profile/mutualcontact',
132 'name' => 'Self contact',
133 'nick' => 'selfcontact',
135 'nurl' => 'http://localhost/profile/selfcontact',
136 'url' => 'http://localhost/profile/selfcontact',
137 'about' => 'User used in tests',
140 'rel' => Contact::FOLLOWER,
141 'network' => Protocol::DFRN,
142 'location' => 'DFRN',
144 // Having the same name and nick allows us to test
145 // the fallback to api_get_nick() in api_get_user()
150 'name' => 'othercontact',
151 'nick' => 'othercontact',
153 'nurl' => 'http://localhost/profile/othercontact',
154 'url' => 'http://localhost/profile/othercontact',
157 'rel' => Contact::NOTHING,
158 'network' => Protocol::DFRN,
159 'location' => 'DFRN',
165 'name' => 'Friend contact',
166 'nick' => 'friendcontact',
168 'nurl' => 'http://localhost/profile/friendcontact',
169 'url' => 'http://localhost/profile/friendcontact',
172 'rel' => Contact::SHARING,
173 'network' => Protocol::DFRN,
174 'location' => 'DFRN',
180 'name' => 'Friend contact',
181 'nick' => 'friendcontact',
183 'nurl' => 'http://localhost/profile/friendcontact',
184 'url' => 'http://localhost/profile/friendcontact',
187 'rel' => Contact::SHARING,
188 'network' => Protocol::DFRN,
189 'location' => 'DFRN',
195 'name' => 'Mutual contact',
196 'nick' => 'mutualcontact',
198 'nurl' => 'http://localhost/profile/mutualcontact',
199 'url' => 'http://localhost/profile/mutualcontact',
202 'rel' => Contact::FRIEND,
203 'network' => Protocol::DFRN,
204 'location' => 'DFRN',
210 'name' => 'Mutual contact',
211 'nick' => 'mutualcontact',
213 'nurl' => 'http://localhost/profile/mutualcontact',
214 'url' => 'http://localhost/profile/mutualcontact',
217 'rel' => Contact::SHARING,
218 'network' => Protocol::DFRN,
219 'location' => 'DFRN',
229 'name' => 'http://activitystrea.ms/schema/1.0/like',
233 'name' => 'http://purl.org/macgirvin/dfrn/1.0/dislike',
237 'name' => 'http://purl.org/zot/activity/attendyes',
241 'name' => 'http://purl.org/zot/activity/attendno',
245 'name' => 'http://purl.org/zot/activity/attendmaybe',
249 'name' => 'http://activitystrea.ms/schema/1.0/follow',
253 'name' => 'https://www.w3.org/ns/activitystreams#Announce',
257 'name' => 'http://activitystrea.ms/schema/1.0/post',
263 'body' => 'Parent status',
264 'plink' => 'http://localhost/display/1',
269 'plink' => 'http://localhost/display/2',
273 'body' => 'Other user status',
274 'plink' => 'http://localhost/display/3',
278 'body' => 'Friend user reply',
279 'plink' => 'http://localhost/display/4',
283 'body' => '[share]Shared status[/share]',
284 'plink' => 'http://localhost/display/5',
288 'body' => 'Friend user status',
289 'plink' => 'http://localhost/display/6',
295 'parent-uri-id' => 1,
296 'thr-parent-id' => 1,
297 'gravity' => GRAVITY_PARENT,
298 'network' => Protocol::DFRN,
303 'private' => Item::PUBLIC,
309 'parent-uri-id' => 1,
310 'thr-parent-id' => 1,
311 'gravity' => GRAVITY_COMMENT,
312 'network' => Protocol::DFRN,
317 'private' => Item::PUBLIC,
323 'parent-uri-id' => 3,
324 'thr-parent-id' => 3,
325 'gravity' => GRAVITY_PARENT,
326 'network' => Protocol::DFRN,
331 'private' => Item::PUBLIC,
337 'parent-uri-id' => 1,
338 'thr-parent-id' => 1,
339 'gravity' => GRAVITY_COMMENT,
340 'network' => Protocol::DFRN,
345 'private' => Item::PUBLIC,
351 'parent-uri-id' => 1,
352 'thr-parent-id' => 1,
353 'gravity' => GRAVITY_COMMENT,
354 'network' => Protocol::DFRN,
359 'private' => Item::PUBLIC,
365 'parent-uri-id' => 6,
366 'thr-parent-id' => 6,
367 'gravity' => GRAVITY_PARENT,
368 'network' => Protocol::DFRN,
373 'private' => Item::PUBLIC,
390 'parent-uri-id' => 1,
391 'thr-parent-id' => 1,
392 'private' => Item::PUBLIC,
393 'gravity' => GRAVITY_PARENT,
394 'network' => Protocol::DFRN,
405 'parent-uri-id' => 1,
406 'thr-parent-id' => 1,
407 'gravity' => GRAVITY_COMMENT,
408 'network' => Protocol::DFRN,
413 'private' => Item::PUBLIC,
425 'parent-uri-id' => 3,
426 'thr-parent-id' => 3,
427 'gravity' => GRAVITY_PARENT,
428 'network' => Protocol::DFRN,
433 'private' => Item::PUBLIC,
445 'parent-uri-id' => 1,
446 'thr-parent-id' => 1,
447 'gravity' => GRAVITY_COMMENT,
448 'network' => Protocol::DFRN,
453 'private' => Item::PUBLIC,
465 'parent-uri-id' => 1,
466 'thr-parent-id' => 1,
467 'gravity' => GRAVITY_COMMENT,
468 'network' => Protocol::DFRN,
473 'private' => Item::PUBLIC,
485 'parent-uri-id' => 6,
486 'thr-parent-id' => 6,
487 'gravity' => GRAVITY_PARENT,
488 'network' => Protocol::DFRN,
493 'private' => Item::PUBLIC,
505 'parent-uri-id' => 1,
506 'thr-parent-id' => 1,
507 'gravity' => GRAVITY_PARENT,
508 'network' => Protocol::DFRN,
513 'private' => Item::PUBLIC,
525 'parent-uri-id' => 1,
526 'thr-parent-id' => 1,
527 'gravity' => GRAVITY_COMMENT,
528 'network' => Protocol::DFRN,
533 'private' => Item::PUBLIC,
545 'parent-uri-id' => 3,
546 'thr-parent-id' => 3,
547 'gravity' => GRAVITY_PARENT,
548 'network' => Protocol::DFRN,
553 'private' => Item::PUBLIC,
565 'parent-uri-id' => 1,
566 'thr-parent-id' => 1,
567 'gravity' => GRAVITY_COMMENT,
568 'network' => Protocol::DFRN,
573 'private' => Item::PUBLIC,
585 'parent-uri-id' => 1,
586 'thr-parent-id' => 1,
587 'gravity' => GRAVITY_COMMENT,
588 'network' => Protocol::DFRN,
593 'private' => Item::PUBLIC,
609 'parent-uri-id' => 6,
610 'thr-parent-id' => 6,
611 'private' => Item::PUBLIC,
612 'gravity' => GRAVITY_PARENT,
613 'network' => Protocol::DFRN,
625 'network' => Protocol::DFRN,
632 'network' => Protocol::DFRN,
639 'network' => Protocol::DFRN,
642 'post-thread-user' => [
652 'network' => Protocol::DFRN,
665 'network' => Protocol::DFRN,
678 'network' => Protocol::DFRN,
691 'network' => Protocol::DFRN,
704 'network' => Protocol::DFRN,
712 'post-user-id' => 12,
717 'network' => Protocol::DFRN,
726 'name' => 'Reply to',
727 'url' => 'http://localhost/display/1',
728 'photo' => 'http://localhost/',
729 'date' => '2020-01-01 12:12:02',
730 'msg' => 'A test reply from an item',
732 'link' => 'http://localhost/notification/1',
735 'verb' => \Friendica\Protocol\Activity::POST,
736 'otype' => Notification\ObjectType::ITEM,
737 'name_cache' => 'Reply to',
738 'msg_cache' => 'A test reply from an item',
752 'name' => 'Visible list',
758 'name' => 'Private list',
764 'term' => 'Saved search',