You are here

public function ApplicationTest::testAddingAlreadySetDefinitionElementData 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::testAddingAlreadySetDefinitionElementData()

@expectedException \LogicException @dataProvider getAddingAlreadySetDefinitionElementData

File

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

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testAddingAlreadySetDefinitionElementData($def) {
  $application = new Application();
  $application
    ->setAutoExit(false);
  $application
    ->setCatchExceptions(false);
  $application
    ->register('foo')
    ->setDefinition(array(
    $def,
  ))
    ->setCode(function (InputInterface $input, OutputInterface $output) {
  });
  $input = new ArrayInput(array(
    'command' => 'foo',
  ));
  $output = new NullOutput();
  $application
    ->run($input, $output);
}