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;
38 // Base test config to avoid notice messages
43 'v' => 'http://localhost',
52 'k' => 'worker_dont_fork',
57 'k' => 'curl_timeout',
69 'username' => 'Test user',
70 'nickname' => 'selfcontact',
72 'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
110 'uri' => 'http://localhost/profile/selfcontact',
115 'uri' => 'http://localhost/profile/othercontact',
120 'uri' => 'http://localhost/profile/friendcontact',
125 'uri' => 'http://localhost/profile/mutualcontact',
134 'name' => 'Self contact',
135 'nick' => 'selfcontact',
137 'nurl' => 'http://localhost/profile/selfcontact',
138 'url' => 'http://localhost/profile/selfcontact',
139 'about' => 'User used in tests',
142 'rel' => Contact::FOLLOWER,
143 'network' => Protocol::DFRN,
144 'location' => 'DFRN',
146 // Having the same name and nick allows us to test
147 // the fallback to api_get_nick() in api_get_user()
152 'name' => 'othercontact',
153 'nick' => 'othercontact',
155 'nurl' => 'http://localhost/profile/othercontact',
156 'url' => 'http://localhost/profile/othercontact',
159 'rel' => Contact::NOTHING,
160 'network' => Protocol::DFRN,
161 'location' => 'DFRN',
167 'name' => 'Friend contact',
168 'nick' => 'friendcontact',
170 'nurl' => 'http://localhost/profile/friendcontact',
171 'url' => 'http://localhost/profile/friendcontact',
174 'rel' => Contact::SHARING,
175 'network' => Protocol::DFRN,
176 'location' => 'DFRN',
182 'name' => 'Friend contact',
183 'nick' => 'friendcontact',
185 'nurl' => 'http://localhost/profile/friendcontact',
186 'url' => 'http://localhost/profile/friendcontact',
189 'rel' => Contact::SHARING,
190 'network' => Protocol::DFRN,
191 'location' => 'DFRN',
197 'name' => 'Mutual contact',
198 'nick' => 'mutualcontact',
200 'nurl' => 'http://localhost/profile/mutualcontact',
201 'url' => 'http://localhost/profile/mutualcontact',
204 'rel' => Contact::FRIEND,
205 'network' => Protocol::DFRN,
206 'location' => 'DFRN',
212 'name' => 'Mutual contact',
213 'nick' => 'mutualcontact',
215 'nurl' => 'http://localhost/profile/mutualcontact',
216 'url' => 'http://localhost/profile/mutualcontact',
219 'rel' => Contact::SHARING,
220 'network' => Protocol::DFRN,
221 'location' => 'DFRN',
231 'name' => 'http://activitystrea.ms/schema/1.0/like',
235 'name' => 'http://purl.org/macgirvin/dfrn/1.0/dislike',
239 'name' => 'http://purl.org/zot/activity/attendyes',
243 'name' => 'http://purl.org/zot/activity/attendno',
247 'name' => 'http://purl.org/zot/activity/attendmaybe',
251 'name' => 'http://activitystrea.ms/schema/1.0/follow',
255 'name' => 'https://www.w3.org/ns/activitystreams#Announce',
259 'name' => 'http://activitystrea.ms/schema/1.0/post',
265 'body' => 'Parent status',
266 'plink' => 'http://localhost/display/1',
271 'plink' => 'http://localhost/display/2',
275 'body' => 'Other user status',
276 'plink' => 'http://localhost/display/3',
280 'body' => 'Friend user reply',
281 'plink' => 'http://localhost/display/4',
285 'body' => '[share]Shared status[/share]',
286 'plink' => 'http://localhost/display/5',
290 'body' => 'Friend user status',
291 'plink' => 'http://localhost/display/6',
297 'parent-uri-id' => 1,
298 'thr-parent-id' => 1,
299 'gravity' => GRAVITY_PARENT,
300 'network' => Protocol::DFRN,
305 'private' => Item::PUBLIC,
312 'parent-uri-id' => 1,
313 'thr-parent-id' => 1,
314 'gravity' => GRAVITY_COMMENT,
315 'network' => Protocol::DFRN,
320 'private' => Item::PUBLIC,
327 'parent-uri-id' => 3,
328 'thr-parent-id' => 3,
329 'gravity' => GRAVITY_PARENT,
330 'network' => Protocol::DFRN,
335 'private' => Item::PUBLIC,
342 'parent-uri-id' => 1,
343 'thr-parent-id' => 1,
344 'gravity' => GRAVITY_COMMENT,
345 'network' => Protocol::DFRN,
350 'private' => Item::PUBLIC,
357 'parent-uri-id' => 1,
358 'thr-parent-id' => 1,
359 'gravity' => GRAVITY_COMMENT,
360 'network' => Protocol::DFRN,
365 'private' => Item::PUBLIC,
372 'parent-uri-id' => 6,
373 'thr-parent-id' => 6,
374 'gravity' => GRAVITY_PARENT,
375 'network' => Protocol::DFRN,
380 'private' => Item::PUBLIC,
398 'parent-uri-id' => 1,
399 'thr-parent-id' => 1,
400 'private' => Item::PUBLIC,
402 'gravity' => GRAVITY_PARENT,
403 'network' => Protocol::DFRN,
414 'parent-uri-id' => 1,
415 'thr-parent-id' => 1,
416 'gravity' => GRAVITY_COMMENT,
417 'network' => Protocol::DFRN,
422 'private' => Item::PUBLIC,
435 'parent-uri-id' => 3,
436 'thr-parent-id' => 3,
437 'gravity' => GRAVITY_PARENT,
438 'network' => Protocol::DFRN,
443 'private' => Item::PUBLIC,
456 'parent-uri-id' => 1,
457 'thr-parent-id' => 1,
458 'gravity' => GRAVITY_COMMENT,
459 'network' => Protocol::DFRN,
464 'private' => Item::PUBLIC,
477 'parent-uri-id' => 1,
478 'thr-parent-id' => 1,
479 'gravity' => GRAVITY_COMMENT,
480 'network' => Protocol::DFRN,
485 'private' => Item::PUBLIC,
498 'parent-uri-id' => 6,
499 'thr-parent-id' => 6,
500 'gravity' => GRAVITY_PARENT,
501 'network' => Protocol::DFRN,
506 'private' => Item::PUBLIC,
519 'parent-uri-id' => 1,
520 'thr-parent-id' => 1,
521 'gravity' => GRAVITY_PARENT,
522 'network' => Protocol::DFRN,
527 'private' => Item::PUBLIC,
540 'parent-uri-id' => 1,
541 'thr-parent-id' => 1,
542 'gravity' => GRAVITY_COMMENT,
543 'network' => Protocol::DFRN,
548 'private' => Item::PUBLIC,
561 'parent-uri-id' => 3,
562 'thr-parent-id' => 3,
563 'gravity' => GRAVITY_PARENT,
564 'network' => Protocol::DFRN,
569 'private' => Item::PUBLIC,
582 'parent-uri-id' => 1,
583 'thr-parent-id' => 1,
584 'gravity' => GRAVITY_COMMENT,
585 'network' => Protocol::DFRN,
590 'private' => Item::PUBLIC,
603 'parent-uri-id' => 1,
604 'thr-parent-id' => 1,
605 'gravity' => GRAVITY_COMMENT,
606 'network' => Protocol::DFRN,
611 'private' => Item::PUBLIC,
628 'parent-uri-id' => 6,
629 'thr-parent-id' => 6,
630 'private' => Item::PUBLIC,
632 'gravity' => GRAVITY_PARENT,
633 'network' => Protocol::DFRN,
645 'network' => Protocol::DFRN,
652 'network' => Protocol::DFRN,
659 'network' => Protocol::DFRN,
662 'post-thread-user' => [
672 'network' => Protocol::DFRN,
685 'network' => Protocol::DFRN,
698 'network' => Protocol::DFRN,
711 'network' => Protocol::DFRN,
724 'network' => Protocol::DFRN,
732 'post-user-id' => 12,
737 'network' => Protocol::DFRN,
746 'name' => 'Reply to',
747 'url' => 'http://localhost/display/1',
748 'photo' => 'http://localhost/',
749 'date' => '2020-01-01 12:12:02',
750 'msg' => 'A test reply from an item',
752 'link' => 'http://localhost/notification/1',
755 'verb' => \Friendica\Protocol\Activity::POST,
756 'otype' => Notification\ObjectType::ITEM,
757 'name_cache' => 'Reply to',
758 'msg_cache' => 'A test reply from an item',
772 'name' => 'Visible list',
778 'name' => 'Private list',
784 'term' => 'Saved search',