[Console] Fixed invalid help command shortcut
This commit is contained in:
parent
a86bac44ce
commit
56935f85df
@ -147,7 +147,7 @@ class Application
|
||||
$output->setDecorated(true);
|
||||
}
|
||||
|
||||
if (true === $input->hasParameterOption(array('--help', '-H'))) {
|
||||
if (true === $input->hasParameterOption(array('--help', '-h'))) {
|
||||
if (!$name) {
|
||||
$name = 'help';
|
||||
$input = new ArrayInput(array('command' => 'help'));
|
||||
|
@ -267,6 +267,9 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
||||
$tester->run(array('--help' => true));
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(), '->run() runs the help command if --help is passed');
|
||||
|
||||
$tester->run(array('-h' => true));
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(), '->run() runs the help command if -h is passed');
|
||||
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->setCatchExceptions(false);
|
||||
@ -274,6 +277,9 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
||||
$tester->run(array('command' => 'list', '--help' => true));
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(), '->run() displays the help if --help is passed');
|
||||
|
||||
$tester->run(array('command' => 'list', '-h' => true));
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(), '->run() displays the help if -h is passed');
|
||||
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->setCatchExceptions(false);
|
||||
|
Reference in New Issue
Block a user