File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/Symfony/Component/Console/Tests/Input Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,21 @@ public function testHasParameterOptionEdgeCasesAndLimitations()
337
337
$ this ->assertFalse ($ input ->hasParameterOption ('-fh ' ), '->hasParameterOption() returns true if the given short option is in the raw input ' );
338
338
}
339
339
340
+ public function testNoWarningOnInvalidParameterOption ()
341
+ {
342
+ $ input = new ArgvInput (array ('cli.php ' , '-edev ' ));
343
+
344
+ // Control.
345
+ $ this ->assertTrue ($ input ->hasParameterOption (array ('-e ' , '' )));
346
+ // No warning is thrown if https://github.com/symfony/symfony/pull/26156 is fixed
347
+ $ this ->assertFalse ($ input ->hasParameterOption (array ('-m ' , '' )));
348
+
349
+ // Control.
350
+ $ this ->assertEquals ('dev ' , $ input ->getParameterOption (array ('-e ' , '' )));
351
+ // No warning is thrown if https://github.com/symfony/symfony/pull/26156 is fixed
352
+ $ this ->assertEquals ('' , $ input ->getParameterOption (array ('-m ' , '' )));
353
+ }
354
+
340
355
public function testToString ()
341
356
{
342
357
$ input = new ArgvInput (array ('cli.php ' , '-f ' , 'foo ' ));
You can’t perform that action at this time.