You are here

public function InputTest::testGetInvalidOption in Zircon Profile 8

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

@expectedException \InvalidArgumentException @expectedExceptionMessage The "foo" option does not exist.

File

vendor/symfony/console/Tests/Input/InputTest.php, line 55

Class

InputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testGetInvalidOption() {
  $input = new ArrayInput(array(
    '--name' => 'foo',
  ), new InputDefinition(array(
    new InputOption('name'),
    new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default'),
  )));
  $input
    ->getOption('foo');
}