You are here

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

File

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

Class

InputDefinitionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

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