From 439a69572784e0d8c7c0b886125cbc579d45016a Mon Sep 17 00:00:00 2001 From: root Date: Sun, 12 Jul 2026 23:39:11 -0400 Subject: [PATCH] fix test issues --- app/Config/Constants.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 47b92f8..d92bb5e 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -25,6 +25,19 @@ defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App'); */ defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php'); +/* + | -------------------------------------------------------------------------- + | Test Support Path + | -------------------------------------------------------------------------- + | + | Spark may be run with CI_ENVIRONMENT=testing before CodeIgniter's PHPUnit + | bootstrap has had a chance to define SUPPORTPATH. The framework autoloader + | expects this constant when that environment flag is present. + */ +if (! defined('SUPPORTPATH') && defined('TESTPATH') && is_dir(TESTPATH . '_support')) { + define('SUPPORTPATH', realpath(TESTPATH . '_support') . DIRECTORY_SEPARATOR); +} + /* |-------------------------------------------------------------------------- | Timing Constants