BUGFIX Fixed PhpSyntaxTest not to rely on relative folder references (broken due to chdir() changes in cli-script.php and bootstrap.php) (from r111097)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112894 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-19 03:46:04 +00:00
parent 47f27bef87
commit 3808b1f393

View File

@ -33,7 +33,11 @@ class PhpSyntaxTest extends SapphireTest {
function getAllFiles($ext = 'php') { function getAllFiles($ext = 'php') {
// TODO: Unix only // TODO: Unix only
$CLI_regexp = escapeshellarg("\.$ext\$"); $cmd = sprintf(
return explode("\n", trim(`find .. | grep $CLI_regexp`)); 'find %s | grep %s',
BASE_PATH,
escapeshellarg("\.$ext\$")
);
return explode("\n", trim(`$cmd`));
} }
} }