Using escapeshellarg instead of putting backshlashes in front of spaces

Signed-off-by: Luca Degasperi <dega.luca@gmail.com>
This commit is contained in:
Luca Degasperi 2012-06-27 17:31:38 +02:00
parent ad2540c979
commit 79a5dc1931
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ protected function test()
$path = path('base').'phpunit.xml';
// fix the spaced directories problem when using the command line
$path = str_replace(" ", "\\ ", $path);
// strings with spaces inside should be wrapped in quotes.
$path = escapeshellarg($path)
passthru('phpunit --configuration '.$path);