You are here

public function InputDefinitionTest::testConstructorOptions 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::testConstructorOptions()

File

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

Class

InputDefinitionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testConstructorOptions() {
  $this
    ->initializeOptions();
  $definition = new InputDefinition();
  $this
    ->assertEquals(array(), $definition
    ->getOptions(), '__construct() creates a new InputDefinition object');
  $definition = new InputDefinition(array(
    $this->foo,
    $this->bar,
  ));
  $this
    ->assertEquals(array(
    'foo' => $this->foo,
    'bar' => $this->bar,
  ), $definition
    ->getOptions(), '__construct() takes an array of InputOption objects as its first argument');
}