From 0b65923c379f98c0bed6f27cbea0c14e37b98d86 Mon Sep 17 00:00:00 2001 From: Daniel Holmes Date: Tue, 29 Mar 2011 14:58:43 +1100 Subject: [PATCH] [FrameworkBundle] fixed error with arg reversing from previous changes --- src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php index 48731a451b..01c6d7b7bd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php @@ -88,10 +88,10 @@ abstract class WebTestCase extends BaseWebTestCase private function getPhpUnitCliConfigArgument() { $dir = null; - - foreach (array_reverse($_SERVER['argv']) as $argIndex=>$testArg) { + $reversedArgs = array_reverse($_SERVER['argv']); + foreach ($reversedArgs as $argIndex=>$testArg) { if ($testArg === '-c' || $testArg === '--configuration') { - $dir = realpath($_SERVER['argv'][$argIndex + 1]); + $dir = realpath($reversedArgs[$argIndex - 1]); break; } else if (strpos($testArg, '--configuration=') === 0) { $argPath = substr($testArg, strlen('--configuration='));