mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
f6c8f6bd54
commit
19c235a5bf
@ -8,6 +8,7 @@
|
|||||||
function hasPhpUnit() {
|
function hasPhpUnit() {
|
||||||
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
|
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
|
||||||
foreach($paths as $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;
|
if(@file_exists("$path/PHPUnit/Framework.php")) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user