mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02: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
1 changed files with 7 additions and 5 deletions
|
@ -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.
|
// Composer packages present.
|
||||||
require_once(__DIR__.'/../../../../vendor/autoload.php');
|
require_once(__DIR__.'/../../../../vendor/autoload.php');
|
||||||
}
|
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/autoload.php');
|
||||||
|
|
||||||
// Verify PHPUnit libs can be loaded.
|
} else {
|
||||||
if (!include_once('PHPUnit/Autoload.php')) {
|
// Verify PHPUnit PEAR libs can be loaded.
|
||||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
if (!include('PHPUnit/Autoload.php')) {
|
||||||
|
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($options['run']) {
|
if ($options['run']) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue