From: Max Semenik Date: Sat, 9 Oct 2010 19:00:44 +0000 (+0000) Subject: Follow-up r74553, r74554 and r74555: don't guess, just include stuff properly X-Git-Tag: 1.31.0-rc.0~34564 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=19f3178a045f31176ade98287e19f67dd6cb0c57;p=lhc%2Fweb%2Fwiklou.git Follow-up r74553, r74554 and r74555: don't guess, just include stuff properly --- diff --git a/maintenance/tests/phpunit/phpunit.php b/maintenance/tests/phpunit/phpunit.php index 139d54eefb..fda2f730c3 100755 --- a/maintenance/tests/phpunit/phpunit.php +++ b/maintenance/tests/phpunit/phpunit.php @@ -28,21 +28,7 @@ $pathSeparator = wfIsWindows() ? ';' : ':'; $folders = explode( $pathSeparator, getenv('PATH') ); -# We may not have PHPUnit folder in the path, but have -# PEAR folder in the include path. -$includeFolders = explode( $pathSeparator, get_include_path() ); -foreach ( $includeFolders as $includeFolder ) { - $folders[] = "$includeFolder/PHPUnit"; -} - -foreach ( $folders as $folder ) { - if ( file_exists( "$folder/$targetFile" ) ) { - require_once "$folder/$targetFile"; - exit(0); - } -} - -echo "I couldn't find PHPUnit\nTry adding its folder to your PATH\n"; - -die( 1 ); +require 'PHPUnit/TextUI/Command.php'; +define('PHPUnit_MAIN_METHOD', 'PHPUnit_TextUI_Command::main'); +PHPUnit_TextUI_Command::main();