You are here

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

@expectedException \LogicException @expectedExceptionMessage Cannot add an argument after an array argument.

File

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

Class

InputDefinitionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testArrayArgumentHasToBeLast() {
  $this
    ->initializeArguments();
  $definition = new InputDefinition();
  $definition
    ->addArgument(new InputArgument('fooarray', InputArgument::IS_ARRAY));
  $definition
    ->addArgument(new InputArgument('anotherbar'));
}