From 758fc1dfb263236a651ea688f07b620233e26330 Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Wed, 6 Jan 2016 10:52:17 +0100 Subject: [PATCH] [FrameworkBundle] Add case in Kernel directory guess for PHPUnit --- src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php index d296b29313..434aecf227 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php @@ -103,10 +103,14 @@ abstract class WebTestCase 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; } }