public function CommandTest::testGetSetHelp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Command/CommandTest.php \Symfony\Component\Console\Tests\Command\CommandTest::testGetSetHelp()
File
- vendor/
symfony/ console/ Tests/ Command/ CommandTest.php, line 127
Class
Namespace
Symfony\Component\Console\Tests\CommandCode
public function testGetSetHelp() {
$command = new \TestCommand();
$this
->assertEquals('help', $command
->getHelp(), '->getHelp() returns the help');
$ret = $command
->setHelp('help1');
$this
->assertEquals($command, $ret, '->setHelp() implements a fluent interface');
$this
->assertEquals('help1', $command
->getHelp(), '->setHelp() sets the help');
$command
->setHelp('');
$this
->assertEquals('description', $command
->getHelp(), '->getHelp() fallback to the description');
}