cvs: pear / AllTests.php

From: Date: Thu, 05 Jul 2007 05:13:48 +0000
Subject: cvs: pear / AllTests.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-47858@lists.php.net to get a copy of this message
cweiske Thu Jul 5 05:13:48 2007 UTC Modified files: /pear AllTests.php Log: Put local cvs dirs first in include path but not all of them http://cvs.php.net/viewvc.cgi/pear/AllTests.php?r1=1.8&r2=1.9&diff_format=u Index: pear/AllTests.php diff -u pear/AllTests.php:1.8 pear/AllTests.php:1.9 --- pear/AllTests.php:1.8 Tue Jul 3 20:05:18 2007 +++ pear/AllTests.php Thu Jul 5 05:13:47 2007 @@ -40,6 +40,13 @@ 'Math_Numbers/tests/AllTests.php' => 'Numbers_Roman_AllTests', ); + /** + * Directories that are not going to be in include_path + */ + protected static $noInclude = array( + 'Bugtracker', 'Forum', 'installphars', 'PEAR' + ); + public static function main() @@ -81,8 +88,15 @@ { $base = dirname(__FILE__); $arDirs = glob($base . '/*/', GLOB_ONLYDIR); + foreach ($arDirs as $nId => $strDir) { + $strPackageName = substr($strDir, strrpos($strDir, '/', -2) + 1, -1); + if (in_array($strPackageName, self::$noInclude)) { + unset($arDirs[$nId]); + } + } $path = implode(':', $arDirs); - set_include_path(get_include_path() . ':' . $path); + set_include_path('.:' . $path . ':' . str_replace('.:', '', get_include_path())); +//var_dump(get_include_path()); }//public static function prepareIncludePath()

« previous php.pear.cvs (#47858) next »