]> git.mxchange.org Git - friendica.git/blob - tests/datasets/storage/database.fixture.php
Merge branch 'develop' of https://github.com/friendica/friendica into develop
[friendica.git] / tests / datasets / storage / database.fixture.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2021, the Friendica project
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 use Friendica\Core\Protocol;
23 use Friendica\Model\Contact;
24
25 return [
26         'user'    => [
27                 [
28                         'uid'      => 42,
29                         'username' => 'Test user',
30                         'nickname' => 'selfcontact',
31                         'verified' => 1,
32                         'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
33                         'theme'    => 'frio',
34                 ],
35         ],
36         'contact' => [
37                 [
38                         'id'      => 42,
39                         'uid'     => 42,
40                         'name'    => 'Self contact',
41                         'nick'    => 'selfcontact',
42                         'self'    => 1,
43                         'nurl'    => 'http://localhost/profile/selfcontact',
44                         'url'     => 'http://localhost/profile/selfcontact',
45                         'about'   => 'User used in tests',
46                         'pending' => 0,
47                         'blocked' => 0,
48                         'rel'     => Contact::FOLLOWER,
49                         'network' => Protocol::DFRN,
50                         'location' => 'DFRN',
51                 ],
52         ],
53         'photo'   => [
54                 // move from data-attribute to storage backend
55                 [
56                         'id'            => 1,
57                         'uid'           => 42,
58                         'contact-id'    => 42,
59                         'backend-class' => null,
60                         'backend-ref'   => 'f0c0d0i2',
61                         'data'          => 'without class',
62                 ],
63                 // move from storage-backend to maybe filesystem backend, skip at database backend
64                 [
65                         'id'            => 2,
66                         'uid'           => 42,
67                         'contact-id'    => 42,
68                         'backend-class' => 'Database',
69                         'backend-ref'   => 1,
70                         'data'          => '',
71                 ],
72                 // move data if invalid storage
73                 [
74                         'id'            => 3,
75                         'uid'           => 42,
76                         'contact-id'    => 42,
77                         'backend-class' => 'invalid!',
78                         'backend-ref'   => 'unimported',
79                         'data'          => 'invalid data moved',
80                 ],
81 // @todo Check failing test because of this (never loaded) fixture
82 //              [
83 //                      'id'            => 4,
84 //                      'uid'           => 42,
85 //                      'contact-id'    => 42,
86 //                      'backend-class' => 'invalid!',
87 //                      'backend-ref'   => 'unimported',
88 //                      'data'          => '',
89 //              ],
90         ],
91         'storage' => [
92                 [
93                         'id'   => 1,
94                         'data' => 'inside database',
95                 ],
96         ],
97 ];