瀏覽代碼

Update tests/runalltests.php to check for $PHPUNIT environment variable like runtests.sh does

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24804 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan 13 年之前
父節點
當前提交
8a7ef385cd
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      tests/runalltests.php

+ 5 - 2
tests/runalltests.php

@@ -25,8 +25,11 @@ if (!$PHPUNIT) {
     if (!$PHPUNIT && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $PHPUNIT = `for %i in (phpunit.bat) do @echo.   %~\$PATH:i)`;
     } else {
-        $PHPUNIT = `which phpunit`;
-        $PHPUNIT = trim($PHPUNIT);
+        $PHPUNIT = trim(`echo \$PHPUNIT`);
+        if ( empty($PHPUNIT) ) {
+            $PHPUNIT = `which phpunit`;
+            $PHPUNIT = trim($PHPUNIT);
+        }
     }
 
     $PHPUNIT = trim($PHPUNIT);