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