Skip to content

Commit

Permalink
Make sure AccountData.php is available on CI system
Browse files Browse the repository at this point in the history
  • Loading branch information
mstilkerich committed Jan 16, 2021
1 parent d3f7353 commit b352851
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -13,7 +13,7 @@ stylecheck:
phpcompatcheck:
vendor/bin/phpcs --colors --standard=PHPCompatibility --runtime-set testVersion 7.1 src/ tests/

psalmanalysis:
psalmanalysis: tests/AccountData.php
vendor/bin/psalm --no-cache --shepherd --report=testreports/psalm.txt --report-show-info=true --no-progress

doc:
Expand All @@ -24,3 +24,6 @@ tests:
@[ -f tests/AccountData.php ] || (echo "Create tests/AccountData.php from template tests/AccountData.php.dist to execute tests"; exit 1)
vendor/bin/phpunit

# For github CI system - if AccountData.php is not available, create from AccountData.php.dist
tests/AccountData.php: | tests/AccountData.php.dist
cp $| $@
8 changes: 8 additions & 0 deletions tests/AccountData.php.dist
Expand Up @@ -9,6 +9,7 @@ use MStilkerich\CardDavClient\{Account,AddressbookCollection,Config};
final class AccountData
{
public const ACCOUNTS = [
/*
"iCloud" => [
"username" => "icloudid@example.com",
"password" => "foobar",
Expand Down Expand Up @@ -49,21 +50,25 @@ final class AccountData
"discoveryUri" => "http://localhost/owncloud/remote.php/dav/addressbooks/users/owncloudUser/contacts/",
"syncAllowExtraChanges" => false,
],
*/
"Radicale" => [
"username" => "radicaleUser",
"password" => "foobar",
"discoveryUri" => "http://localhost:5232/",
"syncAllowExtraChanges" => false,
],
/*
"Davical" => [
"username" => "davicalUser",
"password" => "foobar",
"discoveryUri" => "http://localhost/davical",
"syncAllowExtraChanges" => false,
],
*/
];

public const ADDRESSBOOKS = [
/*
"iCloud" => [
"account" => "iCloud",
"url" => "https://pXX-contacts.icloud.com:443/1234567/carddavhome/card/",
Expand Down Expand Up @@ -120,6 +125,7 @@ final class AccountData
"supports_multiget" => true,
"supports_ctag" => true,
],
*/
"Radicale" => [
"account" => "Radicale",
"url" => "http://localhost:5232/radicaleUser/abcdef/",
Expand All @@ -128,6 +134,7 @@ final class AccountData
"supports_multiget" => true,
"supports_ctag" => true,
],
/*
"Davical_0" => [
"account" => "Davical",
"url" => "http://localhost/davical/caldav.php/davicalUser/addresses/",
Expand All @@ -136,6 +143,7 @@ final class AccountData
"supports_multiget" => true,
"supports_ctag" => true,
],
*/
];

/** @var Account[] Caches the Account objects for all accounts from ACCOUNTS*/
Expand Down

0 comments on commit b352851

Please sign in to comment.