Follow r74554. Also take include path into account.
authorPlatonides <platonides@users.mediawiki.org>
Sat, 9 Oct 2010 18:40:05 +0000 (18:40 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 9 Oct 2010 18:40:05 +0000 (18:40 +0000)
maintenance/tests/phpunit/phpunit.php

index 16d0c83..139d54e 100755 (executable)
@@ -27,6 +27,14 @@ $targetFile = wfIsWindows() ? 'phpunit.php' : 'phpunit';
 $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";