You are here

public function StringInputTest::testInputOptionWithGivenString 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::testInputOptionWithGivenString()

File

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

Class

StringInputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testInputOptionWithGivenString() {
  $definition = new InputDefinition(array(
    new InputOption('foo', null, InputOption::VALUE_REQUIRED),
  ));

  // call to bind
  $input = new StringInput('--foo=bar');
  $input
    ->bind($definition);
  $this
    ->assertEquals('bar', $input
    ->getOption('foo'));
}