You are here

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

File

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

Class

CommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testGetSetAliases() {
  $command = new \TestCommand();
  $this
    ->assertEquals(array(
    'name',
  ), $command
    ->getAliases(), '->getAliases() returns the aliases');
  $ret = $command
    ->setAliases(array(
    'name1',
  ));
  $this
    ->assertEquals($command, $ret, '->setAliases() implements a fluent interface');
  $this
    ->assertEquals(array(
    'name1',
  ), $command
    ->getAliases(), '->setAliases() sets the aliases');
}