tests: Load Mockery as late as possible

This commit is contained in:
Johannes Meyer 2021-10-26 14:43:23 +02:00
parent 06d03dc21f
commit 6633bde9e9
1 changed files with 7 additions and 5 deletions

View File

@ -27,11 +27,6 @@ set_include_path(implode(PATH_SEPARATOR, [
$vendorAutoload = $basePath . '/vendor/autoload.php';
if (file_exists($vendorAutoload)) {
require_once $vendorAutoload;
} else {
require_once 'Mockery/Loader.php';
$mockeryLoader = new \Mockery\Loader;
$mockeryLoader->register();
}
require_once($icingaLibPath . '/Test/ClassLoader.php');
@ -117,6 +112,13 @@ set_include_path(
)
);
if (! class_exists('Mockery')) {
require_once 'Mockery/Loader.php';
$mockeryLoader = new \Mockery\Loader;
$mockeryLoader->register();
}
require_once 'Zend/Loader/Autoloader.php';
\Zend_Loader_Autoloader::getInstance();