You are here

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

@expectedException \LogicException @expectedExceptionMessage Cannot add a required argument after an optional one.

File

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

Class

InputDefinitionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testRequiredArgumentCannotFollowAnOptionalOne() {
  $this
    ->initializeArguments();
  $definition = new InputDefinition();
  $definition
    ->addArgument($this->foo);
  $definition
    ->addArgument($this->foo2);
}