From eae1e901e7360b9130edfdcb784b048416409b5c 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 --- phpcs.xml.dist | 11 +++++++---- tests/bootstrap.php | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) 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..4318681 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -17,6 +17,10 @@ } } +if (!$autoloaded) { + throw new RuntimeException("Couldn't find autoloader"); +} + if (!defined('PHP_CODESNIFFER_VERBOSITY')) { define('PHP_CODESNIFFER_VERBOSITY', 0); }