You are here

public function ApplicationTest::testOverwritingDefaultInputDefinitionOverwritesDefaultValues in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/ApplicationTest.php \Symfony\Component\Console\Tests\ApplicationTest::testOverwritingDefaultInputDefinitionOverwritesDefaultValues()

File

vendor/symfony/console/Tests/ApplicationTest.php, line 829

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

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'));
}