8000 [FrameworkBundle] fixed the discovery of the PHPUnit configuration fi… · symfony/symfony@375ded4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 375ded4

Browse files
committed
[FrameworkBundle] fixed the discovery of the PHPUnit configuration file when using aggregate options like in -vc app/ (closes #7562)
1 parent d65788b commit 375ded4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ protected static function getPhpUnitXmlDir()
8282
}
8383

8484
/**
85-
* Finds the value of configuration flag from cli
85+
* Finds the value of the CLI configuration option.
8686
*
8787
* PHPUnit will use the last configuration argument on the command line, so this only returns
88-
* the last configuration argument
88+
* the last configuration argument.
8989
*
90-
* @return string The value of the phpunit cli configuration option
90+
* @return string The value of the PHPUnit cli configuration option
9191
*/
9292
private static function getPhpUnitCliConfigArgument()
9393
{
9494
$dir = null;
9595
$reversedArgs = array_reverse($_SERVER['argv']);
9696
foreach ($reversedArgs as $argIndex => $testArg) {
97-
if ($testArg === '-c' || $testArg === '--configuration') {
97+
if (preg_match('/^-[^ \-]*c$/', $testArg) || $testArg === '--configuration') {
9898
$dir = realpath($reversedArgs[$argIndex - 1]);
9999
break;
100100
} elseif (strpos($testArg, '--configuration=') === 0) {

0 commit comments

Comments
 (0)
0