You are here

public function InputDefinitionTest::testAddOption in Zircon Profile 8

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

File

vendor/symfony/console/Tests/Input/InputDefinitionTest.php, line 228

Class

InputDefinitionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testAddOption() {
  $this
    ->initializeOptions();
  $definition = new InputDefinition();
  $definition
    ->addOption($this->foo);
  $this
    ->assertEquals(array(
    'foo' => $this->foo,
  ), $definition
    ->getOptions(), '->addOption() adds a InputOption object');
  $definition
    ->addOption($this->bar);
  $this
    ->assertEquals(array(
    'foo' => $this->foo,
    'bar' => $this->bar,
  ), $definition
    ->getOptions(), '->addOption() adds a InputOption object');
}