Permalink
Browse files

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
  • Loading branch information...
1 parent 47f27be commit 3808b1f393aca92f24eabf5534ad4228dc744718 @sminnee sminnee committed Oct 19, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 tests/PhpSyntaxTest.php
View
@@ -33,7 +33,11 @@ function testShortTagsOffWillWork() {
function getAllFiles($ext = 'php') {
// TODO: Unix only
- $CLI_regexp = escapeshellarg("\.$ext\$");
- return explode("\n", trim(`find .. | grep $CLI_regexp`));
+ $cmd = sprintf(
+ 'find %s | grep %s',
+ BASE_PATH,
+ escapeshellarg("\.$ext\$")
+ );
+ return explode("\n", trim(`$cmd`));
}
}

0 comments on commit 3808b1f

Please sign in to comment.