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:
Petr Škoda
2014-03-20 17:30:42 +08:00
parent 9b8555fbea
commit 54f1423ecc
2 changed files with 3 additions and 9 deletions
+3 -6
View File
@@ -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']) {