MDL-38364 rework PHPUnit autoloading

This is related to BC incompatibility introduced in https://github.com/sebastianbergmann/phpunit/issues/848
This commit is contained in:
Petr Škoda 2013-03-17 19:54:55 +01:00
parent 7112729206
commit 94388d18ca

View File

@ -48,14 +48,16 @@ list($options, $unrecognized) = cli_get_params(
)
);
if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/autoload.php')) {
// Composer packages present.
require_once(__DIR__.'/../../../../vendor/autoload.php');
}
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/autoload.php');
// Verify PHPUnit libs can be loaded.
if (!include_once('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
} else {
// Verify PHPUnit PEAR libs can be loaded.
if (!include('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
}
}
if ($options['run']) {