diff --git a/tests/phpstan.autoload.inc.php b/tests/phpstan.autoload.inc.php index 37365acf..b35fd357 100644 --- a/tests/phpstan.autoload.inc.php +++ b/tests/phpstan.autoload.inc.php @@ -14,14 +14,16 @@ if (file_exists($base . '/vendor/autoload.php') == TRUE) { // Load composer autoloader. - require_once $base . '/vendor/autoload.php'; + $autoload_file = $base . '/vendor/autoload.php'; } else { // Load decomposer autoloade. - require_once $base . '/decomposer.autoload.inc.php'; + $autoload_file = $base . '/decomposer.autoload.inc.php'; } +require_once $autoload_file; + // Define application config lookup path $paths = [ get_include_path(), diff --git a/tests/test.bootstrap.inc.php b/tests/test.bootstrap.inc.php index 068a1a5a..b9f154c5 100644 --- a/tests/test.bootstrap.inc.php +++ b/tests/test.bootstrap.inc.php @@ -24,14 +24,16 @@ if (file_exists($base . '/vendor/autoload.php') == TRUE) { // Load composer autoloader. - require_once $base . '/vendor/autoload.php'; + $autoload_file = $base . '/vendor/autoload.php'; } else { // Load decomposer autoloade. - require_once $base . '/decomposer.autoload.inc.php'; + $autoload_file = $base . '/decomposer.autoload.inc.php'; } +require_once $autoload_file; + if (defined('TEST_STATICS') === FALSE) { define('TEST_STATICS', __DIR__ . '/statics');