From a125d4da380eea83cd5f00dfb44b7541e82db30f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 13 Nov 2023 13:40:47 +1300 Subject: [PATCH] MNT Resolve CI problems - Tell phpcs what to sniff - Throw a hard error if we can't bootstrap tests correctly - Force Tokens.php to be run for constant declarations --- .env | 12 ++++++++++++ phpcs.xml.dist | 11 +++++++---- tests/bootstrap.php | 10 ++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..142938d --- /dev/null +++ b/.env @@ -0,0 +1,12 @@ +SS_DATABASE_CLASS="MySQLDatabase" +SS_DATABASE_PORT="3380" +SS_DATABASE_SERVER="127.0.0.1" +SS_DATABASE_USERNAME="root" +SS_DATABASE_PASSWORD="root" +SS_ENVIRONMENT_TYPE="dev" +SS_DATABASE_NAME="SS_mysite" +SS_DEFAULT_ADMIN_USERNAME="admin" +SS_DEFAULT_ADMIN_PASSWORD="password" +SS_TRUSTED_PROXY_IPS="*" +SS_MFA_SECRET_KEY="1234567894175b99966561e1efe237e4" +SS_BASE_URL="http://localhost" diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 9bf83ab..6fe3c5e 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,7 +1,10 @@ - - - tests/bootstrap\.php - + + + tests/bootstrap\.php + + + ./src + ./tests diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 7713bfa..b5872d9 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,6 +1,9 @@