Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
This reverts commitccc93678fd
, reversing changes made toe77545ab8d
.
This commit is contained in:
parent
554bc2482e
commit
667b9295f8
@ -284,8 +284,6 @@ class ArgvInput extends Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (0 === strpos($token, '-') && 0 !== strpos($token, '--')) {
|
if (0 === strpos($token, '-') && 0 !== strpos($token, '--')) {
|
||||||
$noValue = explode('=', $token);
|
|
||||||
$token = $noValue[0];
|
|
||||||
$searchableToken = str_replace('-', '', $token);
|
$searchableToken = str_replace('-', '', $token);
|
||||||
$searchableValue = str_replace('-', '', $value);
|
$searchableValue = str_replace('-', '', $value);
|
||||||
if ('' !== $searchableToken && '' !== $searchableValue && false !== strpos($searchableToken, $searchableValue)) {
|
if ('' !== $searchableToken && '' !== $searchableValue && false !== strpos($searchableToken, $searchableValue)) {
|
||||||
|
@ -299,9 +299,6 @@ class ArgvInputTest extends TestCase
|
|||||||
$input = new ArgvInput(array('cli.php', '-fh'));
|
$input = new ArgvInput(array('cli.php', '-fh'));
|
||||||
$this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
$this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
||||||
|
|
||||||
$input = new ArgvInput(array('cli.php', '-e=test'));
|
|
||||||
$this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
|
||||||
|
|
||||||
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
|
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
|
||||||
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user