You are here

public function HelpCommandTest::testExecuteForCommandAlias in Zircon Profile 8

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

File

vendor/symfony/console/Tests/Command/HelpCommandTest.php, line 21

Class

HelpCommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testExecuteForCommandAlias() {
  $command = new HelpCommand();
  $command
    ->setApplication(new Application());
  $commandTester = new CommandTester($command);
  $commandTester
    ->execute(array(
    'command_name' => 'li',
  ), array(
    'decorated' => false,
  ));
  $this
    ->assertContains('list [options] [--] [<namespace>]', $commandTester
    ->getDisplay(), '->execute() returns a text help for the given command alias');
  $this
    ->assertContains('format=FORMAT', $commandTester
    ->getDisplay(), '->execute() returns a text help for the given command alias');
  $this
    ->assertContains('raw', $commandTester
    ->getDisplay(), '->execute() returns a text help for the given command alias');
}