You are here

public function InputOptionTest::testConstructor in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Tests/Input/InputOptionTest.php \Symfony\Component\Console\Tests\Input\InputOptionTest::testConstructor()

File

vendor/symfony/console/Tests/Input/InputOptionTest.php, line 18

Class

InputOptionTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testConstructor() {
  $option = new InputOption('foo');
  $this
    ->assertEquals('foo', $option
    ->getName(), '__construct() takes a name as its first argument');
  $option = new InputOption('--foo');
  $this
    ->assertEquals('foo', $option
    ->getName(), '__construct() removes the leading -- of the option name');
}