mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
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:
parent
7112729206
commit
94388d18ca
@ -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']) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user