BUGFIX #3433: Fixed test runner PHPUnit detection on an instance with trailing slashes in paths

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80215 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-27 06:29:12 +00:00
parent f6c8f6bd54
commit 19c235a5bf

View File

@ -8,6 +8,7 @@
function hasPhpUnit() {
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
foreach($paths as $path) {
if(substr($path,-1) == DIRECTORY_SEPARATOR) $path = substr($path,0,-1);
if(@file_exists("$path/PHPUnit/Framework.php")) return true;
}
return false;