You are here

public function StringInputTest::testLegacyInputOptionDefinitionInConstructor in Zircon Profile 8

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

@group legacy

File

vendor/symfony/console/Tests/Input/StringInputTest.php, line 47

Class

StringInputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testLegacyInputOptionDefinitionInConstructor() {
  $definition = new InputDefinition(array(
    new InputOption('foo', null, InputOption::VALUE_REQUIRED),
  ));
  $input = new StringInput('--foo=bar', $definition);
  $this
    ->assertEquals('bar', $input
    ->getOption('foo'));
}