public function ApplicationTest::testOverwritingDefaultInputDefinitionOverwritesDefaultValues in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/ApplicationTest.php \Symfony\Component\Console\Tests\ApplicationTest::testOverwritingDefaultInputDefinitionOverwritesDefaultValues()
File
- vendor/
symfony/ console/ Tests/ ApplicationTest.php, line 829
Class
Namespace
Symfony\Component\Console\TestsCode
public function testOverwritingDefaultInputDefinitionOverwritesDefaultValues() {
$application = new CustomApplication();
$application
->setAutoExit(false);
$application
->setCatchExceptions(false);
$inputDefinition = $application
->getDefinition();
// check whether the default arguments and options are not returned any more
$this
->assertFalse($inputDefinition
->hasArgument('command'));
$this
->assertFalse($inputDefinition
->hasOption('help'));
$this
->assertFalse($inputDefinition
->hasOption('quiet'));
$this
->assertFalse($inputDefinition
->hasOption('verbose'));
$this
->assertFalse($inputDefinition
->hasOption('version'));
$this
->assertFalse($inputDefinition
->hasOption('ansi'));
$this
->assertFalse($inputDefinition
->hasOption('no-ansi'));
$this
->assertFalse($inputDefinition
->hasOption('no-interaction'));
$this
->assertTrue($inputDefinition
->hasOption('custom'));
}