From b3528515880a3e3664d01490ae5e949b9caca24b Mon Sep 17 00:00:00 2001 From: Michael Stilkerich Date: Sat, 16 Jan 2021 18:57:11 +0100 Subject: [PATCH] Make sure AccountData.php is available on CI system --- Makefile | 5 ++++- tests/AccountData.php.dist | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 65c942f..b84f709 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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 $| $@ diff --git a/tests/AccountData.php.dist b/tests/AccountData.php.dist index a048629..14937ac 100644 --- a/tests/AccountData.php.dist +++ b/tests/AccountData.php.dist @@ -9,6 +9,7 @@ use MStilkerich\CardDavClient\{Account,AddressbookCollection,Config}; final class AccountData { public const ACCOUNTS = [ + /* "iCloud" => [ "username" => "icloudid@example.com", "password" => "foobar", @@ -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/", @@ -120,6 +125,7 @@ final class AccountData "supports_multiget" => true, "supports_ctag" => true, ], + */ "Radicale" => [ "account" => "Radicale", "url" => "http://localhost:5232/radicaleUser/abcdef/", @@ -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/", @@ -136,6 +143,7 @@ final class AccountData "supports_multiget" => true, "supports_ctag" => true, ], + */ ]; /** @var Account[] Caches the Account objects for all accounts from ACCOUNTS*/