/
AccountData.php.dist
157 lines (147 loc) · 5.72 KB
/
AccountData.php.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/*
* CardDAV client library for PHP ("PHP-CardDavClient").
*
* Copyright (c) 2020-2021 Michael Stilkerich <ms@mike2k.de>
* Licensed under the MIT license. See COPYING file in the project root for details.
*/
declare(strict_types=1);
namespace MStilkerich\Tests\CardDavClient\Interop;
use MStilkerich\CardDavClient\{Account,AddressbookCollection,Config};
/**
* @psalm-import-type TestAccount from TestInfrastructureSrv
* @psalm-import-type TestAddressbook from TestInfrastructureSrv
*/
final class AccountData
{
/** @var array<string, TestAccount> */
public const ACCOUNTS = [
"Google" => [
"refreshtoken" => "%GOOGLE_REFRESH_TOKEN%",
"tokenUri" => "https://oauth2.googleapis.com/token",
"oAuthScopes" => "https://www.googleapis.com/auth/carddav",
"clientId" => '%GOOGLE_CLIENTID%',
"clientSecret" => '%GOOGLE_CLIENT_SECRET%',
"discoveryUri" => "gmail.com",
"syncAllowExtraChanges" => true,
"featureSet" => TestInfrastructureSrv::SRVFEATS_GOOGLE,
],
"iCloud" => [
"username" => "%ICLOUD_USER%",
"password" => "%ICLOUD_PASSWORD%",
"discoveryUri" => "icloud.com",
// For providers that report extra changes or deleted cards between two syncs, set this to true to limit the
// sync tests to check whether all known changes are actually reported, without raising an error on any
// additional changes that the server reports. (Google has been observed to behave like this)
"syncAllowExtraChanges" => true,
// known/expected features
"featureSet" => TestInfrastructureSrv::SRVFEATS_ICLOUD,
],
"Davical" => [
"username" => "admin",
"password" => "admin",
"discoveryUri" => "http://localhost:8088/",
"syncAllowExtraChanges" => false,
"featureSet" => TestInfrastructureSrv::SRVFEATS_DAVICAL,
],
"Nextcloud" => [
"username" => "ncadm",
"password" => "ncadmPassw0rd",
"discoveryUri" => "http://localhost:8080/remote.php/dav/",
"syncAllowExtraChanges" => false,
"featureSet" => TestInfrastructureSrv::SRVFEATS_SABRE,
],
"Radicale" => [
"username" => "citest",
"password" => "citest",
"discoveryUri" => "http://localhost:5232/",
"syncAllowExtraChanges" => false,
"featureSet" => TestInfrastructureSrv::SRVFEATS_RADICALE,
],
"Owncloud" => [
"username" => "admin",
"password" => "admin",
"discoveryUri" => "http://localhost:8080/remote.php/dav/",
"syncAllowExtraChanges" => false,
"featureSet" => TestInfrastructureSrv::SRVFEATS_SABRE,
],
"Baikal" => [
"username" => "citest",
"password" => "citest",
"discoveryUri" => "http://localhost:8080/",
"syncAllowExtraChanges" => false,
// as of Baikal 0.8.0, the shipped Sabre/DAV version 4.1.4 still does not contain the fix for this bug
// Bug is fixed in Sabre/DAV 4.1.5
"featureSet" => TestInfrastructureSrv::SRVFEATS_SABRE,
],
/*
"BaikalKrb" => [
"username" => "",
"password" => "",
"discoveryUri" => "http://baikal.example.com",
"syncAllowExtraChanges" => false,
"featureSet" => TestInfrastructureSrv::SRVFEATS_SABRE,
],
"Synology" => [
"username" => "xxx",
"password" => "yyy",
"discoveryUri" => "http://synology:5000/carddav/admin/",
"syncAllowExtraChanges" => false,
"featureSet" => TestInfrastructureSrv::SRVFEATS_SYNOLOGY_CONTACTS,
],
*/
];
/** @var array<string, TestAddressbook> */
public const ADDRESSBOOKS = [
"Google" => [
"account" => "Google",
"url" => "%GOOGLE_URL_ABOOK0%",
"displayname" => "Address Book",
],
"iCloud" => [
"account" => "iCloud",
"url" => "%ICLOUD_URL_ABOOK0%",
"displayname" => "card",
],
"Davical_0" => [
"account" => "Davical",
"url" => "http://localhost:8088/caldav.php/admin/book1/",
"displayname" => "Test addressbook",
],
"Nextcloud" => [
"account" => "Nextcloud",
"url" => "http://localhost:8080/remote.php/dav/addressbooks/users/ncadm/contacts/",
"displayname" => "Contacts",
"readonly" => false,
],
"Radicale_1" => [
"account" => "Radicale",
"url" => "http://localhost:5232/citest/book1/",
"displayname" => "Book 1",
],
"Radicale_2" => [
"account" => "Radicale",
"url" => "http://localhost:5232/citest/book2/",
"displayname" => "Book 2",
"readonly" => true,
],
"Owncloud" => [
"account" => "Owncloud",
"url" => "http://localhost:8080/remote.php/dav/addressbooks/users/admin/contacts/",
"displayname" => "Contacts",
],
"Baikal_0" => [
"account" => "Baikal",
"url" => "http://localhost:8080/dav.php/addressbooks/citest/default/",
"displayname" => "Default Address Book",
],
/*
"BaikalKrb_First" => [
"account" => "BaikalKrb",
"url" => "http://baikal.example.com/dav.php/addressbooks/baikalUser/default/",
"displayname" => "Default Address Book",
],
*/
];
}
// vim: ts=4:sw=4:expandtab:fenc=utf8:ff=unix:tw=120:ft=php