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