File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
src/Symfony/Component/Console Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,8 @@ public function hasParameterOption($values)
284
284
}
285
285
286
286
if (0 === strpos ($ token , '- ' ) && 0 !== strpos ($ token , '-- ' )) {
287
+ $ noValue = explode ('= ' , $ token );
288
+ $ token = $ noValue [0 ];
287
289
$ searchableToken = str_replace ('- ' , '' , $ token );
288
290
$ searchableValue = str_replace ('- ' , '' , $ value );
289
291
if ('' !== $ searchableToken && '' !== $ searchableValue && false !== strpos ($ searchableToken , $ searchableValue )) {
Original file line number Diff line number Diff line change @@ -299,6 +299,9 @@ public function testHasParameterOption()
299
299
$ input = new ArgvInput (array ('cli.php ' , '-fh ' ));
300
300
$ this ->assertTrue ($ input ->hasParameterOption ('-fh ' ), '->hasParameterOption() returns true if the given short option is in the raw input ' );
301
301
302
+ $ input = new ArgvInput (array ('cli.php ' , '-e=test ' ));
303
+ $ this ->assertFalse ($ input ->hasParameterOption ('-s ' ), '->hasParameterOption() returns true if the given short option is in the raw input ' );
304
+
302
305
$ input = new ArgvInput (array ('cli.php ' , '--foo ' , 'foo ' ));
303
306
$ this ->assertTrue ($ input ->hasParameterOption ('--foo ' ), '->hasParameterOption() returns true if the given short option is in the raw input ' );
304
307
You can’t perform that action at this time.
0 commit comments