Permalink
Browse files

MDL-38364 rework PHPUnit autoloading

This is related to BC incompatibility introduced in sebastianbergmann/phpunit#848
  • Loading branch information...
1 parent 29f8c09 commit 6bc755274a4cf8e46590ba7ba5c0f6206ee0ca4b @skodak skodak committed Mar 17, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 admin/tool/phpunit/cli/util.php
@@ -47,14 +47,16 @@
)
);
-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']) {

0 comments on commit 6bc7552

Please sign in to comment.