Index: trunk/phase3/maintenance/tests/phpunit/phpunit.php |
— | — | @@ -28,21 +28,7 @@ |
29 | 29 | |
30 | 30 | $folders = explode( $pathSeparator, getenv('PATH') ); |
31 | 31 | |
32 | | -# We may not have PHPUnit folder in the path, but have |
33 | | -# PEAR folder in the include path. |
34 | | -$includeFolders = explode( $pathSeparator, get_include_path() ); |
35 | | -foreach ( $includeFolders as $includeFolder ) { |
36 | | - $folders[] = "$includeFolder/PHPUnit"; |
37 | | -} |
| 32 | +require 'PHPUnit/TextUI/Command.php'; |
| 33 | +define('PHPUnit_MAIN_METHOD', 'PHPUnit_TextUI_Command::main'); |
| 34 | +PHPUnit_TextUI_Command::main(); |
38 | 35 | |
39 | | -foreach ( $folders as $folder ) { |
40 | | - if ( file_exists( "$folder/$targetFile" ) ) { |
41 | | - require_once "$folder/$targetFile"; |
42 | | - exit(0); |
43 | | - } |
44 | | -} |
45 | | - |
46 | | -echo "I couldn't find PHPUnit\nTry adding its folder to your PATH\n"; |
47 | | - |
48 | | -die( 1 ); |
49 | | - |