From: Platonides Date: Sat, 9 Oct 2010 18:40:05 +0000 (+0000) Subject: Follow r74554. Also take include path into account. X-Git-Tag: 1.31.0-rc.0~34565 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=b29515a082a0d91832caf643d15c2ffa34dc906f;p=lhc%2Fweb%2Fwiklou.git Follow r74554. Also take include path into account. --- diff --git a/maintenance/tests/phpunit/phpunit.php b/maintenance/tests/phpunit/phpunit.php index 16d0c83eb7..139d54eefb 100755 --- a/maintenance/tests/phpunit/phpunit.php +++ b/maintenance/tests/phpunit/phpunit.php @@ -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";