You are here

public function ArgvInputTest::testParseArrayArgument in Zircon Profile 8

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

File

vendor/symfony/console/Tests/Input/ArgvInputTest.php, line 206

Class

ArgvInputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testParseArrayArgument() {
  $input = new ArgvInput(array(
    'cli.php',
    'foo',
    'bar',
    'baz',
    'bat',
  ));
  $input
    ->bind(new InputDefinition(array(
    new InputArgument('name', InputArgument::IS_ARRAY),
  )));
  $this
    ->assertEquals(array(
    'name' => array(
      'foo',
      'bar',
      'baz',
      'bat',
    ),
  ), $input
    ->getArguments(), '->parse() parses array arguments');
}