From a7b77669839b4f7c298908b4179be38feb78e3aa Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Wed, 6 Jan 2016 11:22:56 +0100 Subject: [PATCH] [FrameworkBundle] Add case in Kernel directory guess for PHPUnit --- src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index 04f934c4fe..f179b25dbd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -79,10 +79,14 @@ abstract class KernelTestCase extends \PHPUnit_Framework_TestCase if (preg_match('/^-[^ \-]*c$/', $testArg) || $testArg === '--configuration') { $dir = realpath($reversedArgs[$argIndex - 1]); break; - } elseif (strpos($testArg, '--configuration=') === 0) { + } elseif (0 === strpos($testArg, '--configuration=')) { $argPath = substr($testArg, strlen('--configuration=')); $dir = realpath($argPath); break; + } elseif (0 === strpos($testArg, '-c')) { + $argPath = substr($testArg, strlen('-c')); + $dir = realpath($argPath); + break; } }