test: Load composer autoloader if available
This commit is contained in:
parent
eb674509b4
commit
9e1d14666c
|
@ -24,9 +24,15 @@ set_include_path(implode(PATH_SEPARATOR, [
|
|||
get_include_path()
|
||||
]));
|
||||
|
||||
require_once 'Mockery/Loader.php';
|
||||
$mockeryLoader = new \Mockery\Loader;
|
||||
$mockeryLoader->register();
|
||||
$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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue