]> git.mxchange.org Git - friendica.git/blob - tests/datasets/api.fixture.php
Merge pull request #8271 from MrPetovan/bug/8229-frio-mobile-back-to-top
[friendica.git] / tests / datasets / api.fixture.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2020, Friendica
4  *
5  * @license GNU AGPL version 3 or any later version
6  *
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.
11  *
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.
16  *
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/>.
19  *
20  */
21
22 return [
23         // Empty these tables
24         'cache',
25         'conversation',
26         'pconfig',
27         'photo',
28         'workerqueue',
29         'mail',
30         'item-delivery-data',
31         // Base test config to avoid notice messages
32         'config'  => [
33                 [
34                         'cat' => 'system',
35                         'k'   => 'url',
36                         'v'   => 'http://localhost',
37                 ],
38                 [
39                         'cat' => 'config',
40                         'k'   => 'hostname',
41                         'v'   => 'localhost',
42                 ],
43                 [
44                         'cat' => 'system',
45                         'k'   => 'worker_dont_fork',
46                         'v'   => '1',
47                 ],
48         ],
49         'user'    => [
50                 [
51                         'uid'      => 42,
52                         'username' => 'Test user',
53                         'nickname' => 'selfcontact',
54                         'verified' => 1,
55                         'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
56                         'theme'    => 'frio',
57                 ],
58         ],
59         'contact' => [
60                 [
61                         'id'      => 42,
62                         'uid'     => 42,
63                         'name'    => 'Self contact',
64                         'nick'    => 'selfcontact',
65                         'self'    => 1,
66                         'nurl'    => 'http://localhost/profile/selfcontact',
67                         'url'     => 'http://localhost/profile/selfcontact',
68                         'about'   => 'User used in tests',
69                         'pending' => 0,
70                         'blocked' => 0,
71                         'rel'     => 1,
72                         'network' => 'dfrn',
73                 ],
74                 // Having the same name and nick allows us to test
75                 // the fallback to api_get_nick() in api_get_user()
76                 [
77                         'id'      => 43,
78                         'uid'     => 0,
79                         'name'    => 'othercontact',
80                         'nick'    => 'othercontact',
81                         'self'    => 0,
82                         'nurl'    => 'http://localhost/profile/othercontact',
83                         'url'     => 'http://localhost/profile/othercontact',
84                         'pending' => 0,
85                         'blocked' => 0,
86                         'rel'     => 0,
87                         'network' => 'dfrn',
88                 ],
89                 [
90                         'id'      => 44,
91                         'uid'     => 42,
92                         'name'    => 'Friend contact',
93                         'nick'    => 'friendcontact',
94                         'self'    => 0,
95                         'nurl'    => 'http://localhost/profile/friendcontact',
96                         'url'     => 'http://localhost/profile/friendcontact',
97                         'pending' => 0,
98                         'blocked' => 0,
99                         'rel'     => 2,
100                         'network' => 'dfrn',
101                 ],
102         ],
103         'item'    => [
104                 [
105                         'id'          => 1,
106                         'visible'     => 1,
107                         'contact-id'  => 42,
108                         'author-id'   => 42,
109                         'owner-id'    => 42,
110                         'uid'         => 42,
111                         'verb'        => 'http://activitystrea.ms/schema/1.0/post',
112                         'unseen'      => 1,
113                         'body'        => 'Parent status',
114                         'parent'      => 1,
115                         'author-link' => 'http://localhost/profile/selfcontact',
116                         'wall'        => 1,
117                         'starred'     => 1,
118                         'origin'      => 1,
119                         'allow_cid'   => '',
120                         'allow_gid'   => '',
121                         'deny_cid'    => '',
122                         'deny_gid'    => '',
123                 ],
124                 [
125                         'id'          => 2,
126                         'visible'     => 1,
127                         'contact-id'  => 42,
128                         'author-id'   => 42,
129                         'owner-id'    => 42,
130                         'uid'         => 42,
131                         'verb'        => 'http://activitystrea.ms/schema/1.0/post',
132                         'unseen'      => 0,
133                         'body'        => 'Reply',
134                         'parent'      => 1,
135                         'author-link' => 'http://localhost/profile/selfcontact',
136                         'wall'        => 1,
137                         'starred'     => 0,
138                         'origin'      => 1,
139                 ],
140                 [
141
142                         'id'          => 3,
143                         'visible'     => 1,
144                         'contact-id'  => 43,
145                         'author-id'   => 43,
146                         'owner-id'    => 42,
147                         'uid'         => 42,
148                         'verb'        => 'http://activitystrea.ms/schema/1.0/post',
149                         'unseen'      => 0,
150                         'body'        => 'Other user status',
151                         'parent'      => 3,
152                         'author-link' => 'http://localhost/profile/othercontact',
153                         'wall'        => 1,
154                         'starred'     => 0,
155                         'origin'      => 1,
156                 ],
157                 [
158                         'id'          => 4,
159                         'visible'     => 1,
160                         'contact-id'  => 44,
161                         'author-id'   => 44,
162                         'owner-id'    => 42,
163                         'uid'         => 42,
164                         'verb'        => 'http://activitystrea.ms/schema/1.0/post',
165                         'unseen'      => 0,
166                         'body'        => 'Friend user reply',
167                         'parent'      => 1,
168                         'author-link' => 'http://localhost/profile/othercontact',
169                         'wall'        => 1,
170                         'starred'     => 0,
171                         'origin'      => 1,
172                 ],
173                 [
174
175                         'id'          => 5,
176                         'visible'     => 1,
177                         'contact-id'  => 42,
178                         'author-id'   => 42,
179                         'owner-id'    => 42,
180                         'uid'         => 42,
181                         'verb'        => 'http://activitystrea.ms/schema/1.0/post',
182                         'unseen'      => 0,
183                         'body'        => '[share]Shared status[/share]',
184                         'parent'      => 1,
185                         'author-link' => 'http://localhost/profile/othercontact',
186                         'wall'        => 1,
187                         'starred'     => 0,
188                         'origin'      => 1,
189                         'allow_cid'   => '',
190                         'allow_gid'   => '',
191                         'deny_cid'    => '',
192                         'deny_gid'    => '',
193                 ],
194                 [
195                         'id'          => 6,
196                         'visible'     => 1,
197                         'contact-id'  => 44,
198                         'author-id'   => 44,
199                         'owner-id'    => 42,
200                         'uid'         => 42,
201                         'verb'        => 'http://activitystrea.ms/schema/1.0/post',
202                         'unseen'      => 0,
203                         'body'        => 'Friend user status',
204                         'parent'      => 6,
205                         'author-link' => 'http://localhost/profile/othercontact',
206                         'wall'        => 1,
207                         'starred'     => 0,
208                         'origin'      => 1,
209                 ],
210         ],
211         'notify' => [
212                 [
213                         'id' => 1,
214                         'type' => 8,
215                         'name' => 'Reply to',
216                         'url' => 'http://localhost/display/1',
217                         'photo' => 'http://localhost/',
218                         'date' => '2020-01-01 12:12:02',
219                         'msg' => 'A test reply from an item',
220                         'uid' => 42,
221                         'link' => 'http://localhost/notification/1',
222                         'iid' => 4,
223                         'seen' => 0,
224                         'verb' => '',
225                         'otype' => 'item',
226                         'name_cache' => 'Reply to',
227                         'msg_cache' => 'A test reply from an item',
228                 ],
229         ],
230         'thread'  => [
231                 [
232                         'iid'        => 1,
233                         'visible'    => 1,
234                         'contact-id' => 42,
235                         'author-id'  => 42,
236                         'owner-id'   => 42,
237                         'uid'        => 42,
238                         'wall'       => 1,
239                 ],
240                 [
241                         'iid'        => 3,
242                         'visible'    => 1,
243                         'contact-id' => 43,
244                         'author-id'  => 43,
245                         'owner-id'   => 43,
246                         'uid'        => 0,
247                         'wall'       => 1,
248                 ],
249                 [
250                         'iid'        => 6,
251                         'visible'    => 1,
252                         'contact-id' => 44,
253                         'author-id'  => 44,
254                         'owner-id'   => 44,
255                         'uid'        => 0,
256                         'wall'       => 1,
257                 ],
258         ],
259         'group'   => [
260                 [
261                         'id'      => 1,
262                         'uid'     => 42,
263                         'visible' => 1,
264                         'name'    => 'Visible list',
265                 ],
266                 [
267                         'id'      => 2,
268                         'uid'     => 42,
269                         'visible' => 0,
270                         'name'    => 'Private list',
271                 ],
272         ],
273         'search'  => [
274                 [
275                         'id'   => 1,
276                         'term' => 'Saved search',
277                         'uid'  => 42,
278                 ],
279         ],
280 ];