You are here

public function InputDefinitionTest::testSetOptions in Zircon Profile 8.0

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

File

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

Class

InputDefinitionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testSetOptions() {
  $this
    ->initializeOptions();
  $definition = new InputDefinition(array(
    $this->foo,
  ));
  $this
    ->assertEquals(array(
    'foo' => $this->foo,
  ), $definition
    ->getOptions(), '->setOptions() sets the array of InputOption objects');
  $definition
    ->setOptions(array(
    $this->bar,
  ));
  $this
    ->assertEquals(array(
    'bar' => $this->bar,
  ), $definition
    ->getOptions(), '->setOptions() clears all InputOption objects');
}