From 3808b1f393aca92f24eabf5534ad4228dc744718 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Oct 2010 03:46:04 +0000 Subject: [PATCH] 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 --- tests/PhpSyntaxTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/PhpSyntaxTest.php b/tests/PhpSyntaxTest.php index 8128799aa..b21a59cf4 100644 --- a/tests/PhpSyntaxTest.php +++ b/tests/PhpSyntaxTest.php @@ -33,7 +33,11 @@ class PhpSyntaxTest extends SapphireTest { 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`)); } } \ No newline at end of file