Index: trunk/phase3/maintenance/tests/phpunit/phpunit.php |
— | — | @@ -27,6 +27,14 @@ |
28 | 28 | $pathSeparator = wfIsWindows() ? ';' : ':'; |
29 | 29 | |
30 | 30 | $folders = explode( $pathSeparator, getenv('PATH') ); |
| 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 | +} |
| 38 | + |
31 | 39 | foreach ( $folders as $folder ) { |
32 | 40 | if ( file_exists( "$folder/$targetFile" ) ) { |
33 | 41 | require_once "$folder/$targetFile"; |