[FrameworkBundle] Add case in Kernel directory guess for PHPUnit

This commit is contained in:
Titouan Galopin 2016-01-06 11:22:56 +01:00
parent 6cd79e92f6
commit a7b7766983

View File

@ -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;
}
}