You are here

public function ArgvInputTest::testParseArguments in Zircon Profile 8.0

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

File

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

Class

ArgvInputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testParseArguments() {
  $input = new ArgvInput(array(
    'cli.php',
    'foo',
  ));
  $input
    ->bind(new InputDefinition(array(
    new InputArgument('name'),
  )));
  $this
    ->assertEquals(array(
    'name' => 'foo',
  ), $input
    ->getArguments(), '->parse() parses required arguments');
  $input
    ->bind(new InputDefinition(array(
    new InputArgument('name'),
  )));
  $this
    ->assertEquals(array(
    'name' => 'foo',
  ), $input
    ->getArguments(), '->parse() is stateless');
}