You are here

public function CommandTest::testAddOption in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Command/CommandTest.php \Symfony\Component\Console\Tests\Command\CommandTest::testAddOption()

File

vendor/symfony/console/Tests/Command/CommandTest.php, line 79

Class

CommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testAddOption() {
  $command = new \TestCommand();
  $ret = $command
    ->addOption('foo');
  $this
    ->assertEquals($command, $ret, '->addOption() implements a fluent interface');
  $this
    ->assertTrue($command
    ->getDefinition()
    ->hasOption('foo'), '->addOption() adds an option to the command');
}