3 * @copyright Copyright (C) 2010-2023, 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;
41 'url' => 'https://friendica.test',
42 'info' => 'test_node',
43 'active-week-users' => 1,
44 'active-month-users' => 1,
45 'active-halfyear-users' => 1,
47 'local-comments' => 42,
49 'detection-method' => 'none',
54 // Base test config to avoid notice messages
58 'username' => 'Test user',
59 'nickname' => 'selfcontact',
61 'prvkey' => "-----BEGIN RSA PRIVATE KEY-----\nMIICXgIBAAKBgQDVqxF9kIgtgRL0+q+jTi578FA1r1+crEmlYc0pdxcbmmrhjuRc\nrK1gX3r0mnP25fkHzG+6CAjgbDBRFM1/RXBCyp/KHVks7eQ4yr4MxTRlsxo5qf2o\nnbyNzM7Q+LZhFhe/yIoGN/fuEjlqBE98IfPOrUjsQPX240vGNXIkfLiAWwIDAQAB\nAoGBAIwuiPIdggqAtWQ+mD8HCx5LQwSFw6/xpPu5F7ZNqL52aAsGCbL3o2QoIG4c\na1qf9Ot16BNgNBqxQF3hzRTkBMrKYlmNTUkwJXun/zjQJq2JvOlcrSuXlIucUjs4\nXekVN25aYPHrX9m2FEIUwZTb4UYXbR80KbIDI53BkQ6EwSbpAkEA7aO49CR2Hf1Y\n1d2GaUI/Z0wvbj//+t0Kg0bPt16ca8KVjEQQA5ylsDaiw510jDz9NBQxSOk6If23\nUeRixc1RDQJBAOYtN4YnPM1Zfp6IxXlqMCc+xUWRTPEPFt+WpG+v79koNamAeA6o\nZzTl92hl58IqSdbgojeE2zXWQRvlimFMLQcCQQCV6jND0byyLqFcSeQBg0l8YROK\n+dUC7W80YfeoNod3c8nkMwvnO2tLPyxvO2XLEq6prBNra7bAus5rWyj0oBIBAkEA\n1EvUMFm0TLpEfLgtWuTD8Q6GKLnxO0ztjd+FXrXpBGN/ywyArxRHzJRmctW6wmz6\nmcOqGobhIHCysKYv0bnOtQJAc2M5RwlASHH4jGJzXgt3nboyiJfufM0RV9iry3ho\nCXQRWAONKoLqnsfC6qNP8OzY8FMJcwmPWj7Q/6z6yLBFTA==\n-----END RSA PRIVATE KEY-----",
62 'pubkey' => "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVqxF9kIgtgRL0+q+jTi578FA1\nr1+crEmlYc0pdxcbmmrhjuRcrK1gX3r0mnP25fkHzG+6CAjgbDBRFM1/RXBCyp/K\nHVks7eQ4yr4MxTRlsxo5qf2onbyNzM7Q+LZhFhe/yIoGN/fuEjlqBE98IfPOrUjs\nQPX240vGNXIkfLiAWwIDAQAB\n-----END PUBLIC KEY-----", 'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
104 'uri' => 'http://localhost/profile/selfcontact',
109 'uri' => 'http://localhost/profile/othercontact',
114 'uri' => 'http://localhost/profile/friendcontact',
119 'uri' => 'http://localhost/profile/mutualcontact',
128 'name' => 'Self contact',
129 'nick' => 'selfcontact',
131 'nurl' => 'http://localhost/profile/selfcontact',
132 'url' => 'http://localhost/profile/selfcontact',
133 'notify' => 'http://localhost/friendica/inbox',
134 'about' => 'User used in tests',
135 'prvkey' => "-----BEGIN RSA PRIVATE KEY-----\nMIICXgIBAAKBgQDVqxF9kIgtgRL0+q+jTi578FA1r1+crEmlYc0pdxcbmmrhjuRc\nrK1gX3r0mnP25fkHzG+6CAjgbDBRFM1/RXBCyp/KHVks7eQ4yr4MxTRlsxo5qf2o\nnbyNzM7Q+LZhFhe/yIoGN/fuEjlqBE98IfPOrUjsQPX240vGNXIkfLiAWwIDAQAB\nAoGBAIwuiPIdggqAtWQ+mD8HCx5LQwSFw6/xpPu5F7ZNqL52aAsGCbL3o2QoIG4c\na1qf9Ot16BNgNBqxQF3hzRTkBMrKYlmNTUkwJXun/zjQJq2JvOlcrSuXlIucUjs4\nXekVN25aYPHrX9m2FEIUwZTb4UYXbR80KbIDI53BkQ6EwSbpAkEA7aO49CR2Hf1Y\n1d2GaUI/Z0wvbj//+t0Kg0bPt16ca8KVjEQQA5ylsDaiw510jDz9NBQxSOk6If23\nUeRixc1RDQJBAOYtN4YnPM1Zfp6IxXlqMCc+xUWRTPEPFt+WpG+v79koNamAeA6o\nZzTl92hl58IqSdbgojeE2zXWQRvlimFMLQcCQQCV6jND0byyLqFcSeQBg0l8YROK\n+dUC7W80YfeoNod3c8nkMwvnO2tLPyxvO2XLEq6prBNra7bAus5rWyj0oBIBAkEA\n1EvUMFm0TLpEfLgtWuTD8Q6GKLnxO0ztjd+FXrXpBGN/ywyArxRHzJRmctW6wmz6\nmcOqGobhIHCysKYv0bnOtQJAc2M5RwlASHH4jGJzXgt3nboyiJfufM0RV9iry3ho\nCXQRWAONKoLqnsfC6qNP8OzY8FMJcwmPWj7Q/6z6yLBFTA==\n-----END RSA PRIVATE KEY-----",
136 'pubkey' => "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVqxF9kIgtgRL0+q+jTi578FA1\nr1+crEmlYc0pdxcbmmrhjuRcrK1gX3r0mnP25fkHzG+6CAjgbDBRFM1/RXBCyp/K\nHVks7eQ4yr4MxTRlsxo5qf2onbyNzM7Q+LZhFhe/yIoGN/fuEjlqBE98IfPOrUjs\nQPX240vGNXIkfLiAWwIDAQAB\n-----END PUBLIC KEY-----",
139 'rel' => Contact::FOLLOWER,
140 'network' => Protocol::DFRN,
141 'location' => 'DFRN',
143 // Having the same name and nick allows us to test
144 // the fallback to api_get_nick() in api_get_user()
149 'name' => 'othercontact',
150 'nick' => 'othercontact',
152 'nurl' => 'http://localhost/profile/othercontact',
153 'url' => 'http://localhost/profile/othercontact',
154 'notify' => 'http://localhost/friendica/inbox',
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',
170 'notify' => 'http://localhost/friendica/inbox',
173 'rel' => Contact::SHARING,
174 'network' => Protocol::DFRN,
175 'location' => 'DFRN',
181 'name' => 'Friend contact',
182 'nick' => 'friendcontact',
184 'nurl' => 'http://localhost/profile/friendcontact',
185 'url' => 'http://localhost/profile/friendcontact',
186 'notify' => 'http://localhost/friendica/inbox',
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',
202 'notify' => 'http://localhost/friendica/inbox',
205 'rel' => Contact::FRIEND,
206 'network' => Protocol::DFRN,
207 'location' => 'DFRN',
213 'name' => 'Mutual contact',
214 'nick' => 'mutualcontact',
216 'nurl' => 'http://localhost/profile/mutualcontact',
217 'url' => 'http://localhost/profile/mutualcontact',
218 'notify' => 'http://localhost/friendica/inbox',
221 'rel' => Contact::SHARING,
222 'network' => Protocol::DFRN,
223 'location' => 'DFRN',
229 'name' => 'Self contact',
230 'nick' => 'selfcontact',
232 'nurl' => 'http://localhost/profile/selfcontact',
233 'url' => 'http://localhost/profile/selfcontact',
234 'notify' => 'http://localhost/friendica/inbox',
235 'about' => 'User used in tests',
238 'rel' => Contact::FOLLOWER,
239 'network' => Protocol::DFRN,
240 'location' => 'DFRN',
245 "url" => "http://localhost/profile/selfcontact",
249 "following" => "http://localhost/following/selfcontact",
250 "followers" => "http://localhost/followers/selfcontact",
251 "inbox" => "http://localhost/inbox/selfcontact",
252 "outbox" => "http://localhost/outbox/selfcontact",
253 "sharedinbox" => "http://localhost/inbox",
254 "manually-approve" => 1,
256 "nick" => "selfcontact",
257 "name" => "Self contact",
258 "about" => "User used in tests",
261 "photo" => "http://localhost/photo/profile/admin.jpeg",
263 "addr" => "selfcontact@localhost",
265 "pubkey" => "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVqxF9kIgtgRL0+q+jTi578FA1\nr1+crEmlYc0pdxcbmmrhjuRcrK1gX3r0mnP25fkHzG+6CAjgbDBRFM1/RXBCyp/K\nHVks7eQ4yr4MxTRlsxo5qf2onbyNzM7Q+LZhFhe/yIoGN/fuEjlqBE98IfPOrUjs\nQPX240vGNXIkfLiAWwIDAQAB\n-----END PUBLIC KEY-----",
266 "subscribe" => "/follow?url={uri}",
269 "generator" => "Friendica 'Siberian Iris' 2021.12-dev-1443",
270 "following_count" => 0,
271 "followers_count" => 0,
272 "statuses_count" => 0,
273 "updated" => "2021-11-19 19:17:59",
283 'name' => 'http://activitystrea.ms/schema/1.0/like',
287 'name' => 'http://purl.org/macgirvin/dfrn/1.0/dislike',
291 'name' => 'http://purl.org/zot/activity/attendyes',
295 'name' => 'http://purl.org/zot/activity/attendno',
299 'name' => 'http://purl.org/zot/activity/attendmaybe',
303 'name' => 'http://activitystrea.ms/schema/1.0/follow',
307 'name' => 'https://www.w3.org/ns/activitystreams#Announce',
311 'name' => 'http://activitystrea.ms/schema/1.0/post',
317 'body' => 'Parent status',
318 'plink' => 'http://localhost/display/1',
323 'plink' => 'http://localhost/display/2',
327 'body' => 'Other user status',
328 'plink' => 'http://localhost/display/3',
332 'body' => 'Friend user reply',
333 'plink' => 'http://localhost/display/4',
337 'body' => '[share]Shared status[/share]',
338 'plink' => 'http://localhost/display/5',
342 'body' => 'Friend user status',
343 'plink' => 'http://localhost/display/6',
347 'title' => 'item_title',
348 'body' => 'perspiciatis impedit voluptatem quis molestiae ea qui ' .
349 'reiciendis dolorum aut ducimus sunt consequatur inventore dolor ' .
350 'officiis pariatur doloremque nemo culpa aut quidem qui dolore ' .
351 'laudantium atque commodi alias voluptatem non possimus aperiam ' .
352 'ipsum rerum consequuntur aut amet fugit quia aliquid praesentium ' .
353 'repellendus quibusdam et et inventore mollitia rerum sit autem ' .
354 'pariatur maiores ipsum accusantium perferendis vel sit possimus ' .
355 'veritatis nihil distinctio qui eum repellat officia illum quos ' .
356 'impedit quam iste esse unde qui suscipit aut facilis ut inventore ' .
357 'omnis exercitationem quo magnam consequatur maxime aut illum ' .
358 'soluta quaerat natus unde aspernatur et sed beatae nihil ullam ' .
359 'temporibus corporis ratione blanditiis perspiciatis impedit ' .
360 'voluptatem quis molestiae ea qui reiciendis dolorum aut ducimus ' .
361 'sunt consequatur inventore dolor officiis pariatur doloremque ' .
362 'nemo culpa aut quidem qui dolore laudantium atque commodi alias ' .
363 'voluptatem non possimus aperiam ipsum rerum consequuntur aut ' .
364 'amet fugit quia aliquid praesentium repellendus quibusdam et et ' .
365 'inventore mollitia rerum sit autem pariatur maiores ipsum accusantium ' .
366 'perferendis vel sit possimus veritatis nihil distinctio qui eum ' .
367 'repellat officia illum quos impedit quam iste esse unde qui ' .
368 'suscipit aut facilis ut inventore omnis exercitationem quo magnam ' .
369 'consequatur maxime aut illum soluta quaerat natus unde aspernatur ' .
370 'et sed beatae nihil ullam temporibus corporis ratione blanditiis',
371 'plink' => 'http://localhost/display/6',
377 'parent-uri-id' => 1,
378 'thr-parent-id' => 1,
379 'gravity' => Item::GRAVITY_PARENT,
380 'network' => Protocol::DFRN,
385 'private' => Item::PUBLIC,
392 'parent-uri-id' => 1,
393 'thr-parent-id' => 1,
394 'gravity' => Item::GRAVITY_COMMENT,
395 'network' => Protocol::DFRN,
400 'private' => Item::PUBLIC,
407 'parent-uri-id' => 3,
408 'thr-parent-id' => 3,
409 'gravity' => Item::GRAVITY_PARENT,
410 'network' => Protocol::DFRN,
415 'private' => Item::PUBLIC,
422 'parent-uri-id' => 1,
423 'thr-parent-id' => 1,
424 'gravity' => Item::GRAVITY_COMMENT,
425 'network' => Protocol::DFRN,
430 'private' => Item::PUBLIC,
437 'parent-uri-id' => 1,
438 'thr-parent-id' => 1,
439 'gravity' => Item::GRAVITY_COMMENT,
440 'network' => Protocol::DFRN,
445 'private' => Item::PUBLIC,
452 'parent-uri-id' => 6,
453 'thr-parent-id' => 6,
454 'gravity' => Item::GRAVITY_PARENT,
455 'network' => Protocol::DFRN,
460 'private' => Item::PUBLIC,
467 'parent-uri-id' => 7,
468 'thr-parent-id' => 7,
469 'gravity' => Item::GRAVITY_PARENT,
470 'network' => Protocol::DFRN,
475 'private' => Item::PUBLIC,
493 'parent-uri-id' => 1,
494 'thr-parent-id' => 1,
495 'private' => Item::PUBLIC,
497 'gravity' => Item::GRAVITY_PARENT,
498 'network' => Protocol::DFRN,
509 'parent-uri-id' => 1,
510 'thr-parent-id' => 1,
511 'gravity' => Item::GRAVITY_COMMENT,
512 'network' => Protocol::DFRN,
517 'private' => Item::PUBLIC,
530 'parent-uri-id' => 3,
531 'thr-parent-id' => 3,
532 'gravity' => Item::GRAVITY_PARENT,
533 'network' => Protocol::DFRN,
538 'private' => Item::PUBLIC,
551 'parent-uri-id' => 1,
552 'thr-parent-id' => 1,
553 'gravity' => Item::GRAVITY_COMMENT,
554 'network' => Protocol::DFRN,
559 'private' => Item::PUBLIC,
572 'parent-uri-id' => 1,
573 'thr-parent-id' => 1,
574 'gravity' => Item::GRAVITY_COMMENT,
575 'network' => Protocol::DFRN,
580 'private' => Item::PUBLIC,
593 'parent-uri-id' => 6,
594 'thr-parent-id' => 6,
595 'gravity' => Item::GRAVITY_PARENT,
596 'network' => Protocol::DFRN,
601 'private' => Item::PUBLIC,
614 'parent-uri-id' => 1,
615 'thr-parent-id' => 1,
616 'gravity' => Item::GRAVITY_PARENT,
617 'network' => Protocol::DFRN,
622 'private' => Item::PUBLIC,
635 'parent-uri-id' => 1,
636 'thr-parent-id' => 1,
637 'gravity' => Item::GRAVITY_COMMENT,
638 'network' => Protocol::DFRN,
643 'private' => Item::PUBLIC,
656 'parent-uri-id' => 3,
657 'thr-parent-id' => 3,
658 'gravity' => Item::GRAVITY_PARENT,
659 'network' => Protocol::DFRN,
664 'private' => Item::PUBLIC,
677 'parent-uri-id' => 1,
678 'thr-parent-id' => 1,
679 'gravity' => Item::GRAVITY_COMMENT,
680 'network' => Protocol::DFRN,
685 'private' => Item::PUBLIC,
698 'parent-uri-id' => 1,
699 'thr-parent-id' => 1,
700 'gravity' => Item::GRAVITY_COMMENT,
701 'network' => Protocol::DFRN,
706 'private' => Item::PUBLIC,
723 'parent-uri-id' => 6,
724 'thr-parent-id' => 6,
725 'private' => Item::PUBLIC,
727 'gravity' => Item::GRAVITY_PARENT,
728 'network' => Protocol::DFRN,
744 'parent-uri-id' => 7,
745 'thr-parent-id' => 7,
746 'private' => Item::PUBLIC,
748 'gravity' => Item::GRAVITY_PARENT,
749 'network' => Protocol::DFRN,
761 'network' => Protocol::DFRN,
768 'network' => Protocol::DFRN,
775 'network' => Protocol::DFRN,
782 'network' => Protocol::DFRN,
785 'post-thread-user' => [
795 'network' => Protocol::DFRN,
808 'network' => Protocol::DFRN,
821 'network' => Protocol::DFRN,
834 'network' => Protocol::DFRN,
847 'network' => Protocol::DFRN,
855 'post-user-id' => 12,
860 'network' => Protocol::DFRN,
873 'network' => Protocol::DFRN,
881 'post-user-id' => 12,
886 'network' => Protocol::DFRN,
895 'name' => 'Friend contact',
896 'url' => 'http://localhost/profile/friendcontact',
897 'photo' => 'http://localhost/',
898 'date' => '2020-01-01 12:12:02',
899 'msg' => 'A test reply from an item',
901 'link' => 'http://localhost/display/1',
904 'verb' => \Friendica\Protocol\Activity::POST,
905 'otype' => Notification\ObjectType::ITEM,
906 'name_cache' => 'Friend contact',
907 'msg_cache' => 'A test reply from an item',
921 'name' => 'Visible list',
927 'name' => 'Private list',
950 'term' => 'Saved search',