Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Symfony version(s) affected
Latest 6 and 7, probably more
Description
UsingCommandTester
with--help
options is not working.
How to reproduce
This test is passing (seehere):
// src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.phppublicfunctiontestHelpDisplays() {$command =newCommand('foo');$command->setCode(function (OutputInterface$output) {$output->writeln('Hello foo!'); });$application =newApplication();$application->setAutoExit(false);$application->add($command);$tester =newCommandTester($application->find('foo'));$tester->execute(['--help' =>true]);$this->assertStringContainsString('Hello foo!',$tester->getDisplay());$this->assertEquals('Hello foo!'.\PHP_EOL,$tester->getDisplay()); }
If--help
is replaced with--silent
or--quiet
the test is still passing.
Possible Solution
No response
Additional Context
No response