From 19f3178a045f31176ade98287e19f67dd6cb0c57 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sat, 9 Oct 2010 19:00:44 +0000 Subject: [PATCH] Follow-up r74553, r74554 and r74555: don't guess, just include stuff properly --- maintenance/tests/phpunit/phpunit.php | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) 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(); -- 2.20.1