You are here

public function CommandTest::testGetSetDescription 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::testGetSetDescription()

File

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

Class

CommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testGetSetDescription() {
  $command = new \TestCommand();
  $this
    ->assertEquals('description', $command
    ->getDescription(), '->getDescription() returns the description');
  $ret = $command
    ->setDescription('description1');
  $this
    ->assertEquals($command, $ret, '->setDescription() implements a fluent interface');
  $this
    ->assertEquals('description1', $command
    ->getDescription(), '->setDescription() sets the description');
}