MDL-44510 support PHPUnit 4.x
The old style PEAR installation is incompatible with PHPUnit 4, nobody was supposed to use PEAR any more - composer is the only supported library installation method now.
This commit is contained in:
@@ -50,16 +50,13 @@ list($options, $unrecognized) = cli_get_params(
|
||||
)
|
||||
);
|
||||
|
||||
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php')) {
|
||||
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/composer.json')) {
|
||||
// Composer packages present.
|
||||
require_once(__DIR__.'/../../../../vendor/autoload.php');
|
||||
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php');
|
||||
|
||||
} else {
|
||||
// Verify PHPUnit PEAR libs can be loaded.
|
||||
if (!include('PHPUnit/Autoload.php')) {
|
||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||
}
|
||||
// Note: installation via PEAR is not supported any more.
|
||||
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
|
||||
}
|
||||
|
||||
if ($options['install'] or $options['drop']) {
|
||||
|
||||
Reference in New Issue
Block a user