Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CommandTester ignores options--help and others fromApplication::getDefaultInputDefinition #59765

Open
@kubawerlos

Description

@kubawerlos

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp