You are here

public function ListCommandTest::testExecuteListsCommandsWithNamespaceArgument in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Tests/Command/ListCommandTest.php \Symfony\Component\Console\Tests\Command\ListCommandTest::testExecuteListsCommandsWithNamespaceArgument()

File

vendor/symfony/console/Tests/Command/ListCommandTest.php, line 50

Class

ListCommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testExecuteListsCommandsWithNamespaceArgument() {
  require_once realpath(__DIR__ . '/../Fixtures/FooCommand.php');
  $application = new Application();
  $application
    ->add(new \FooCommand());
  $commandTester = new CommandTester($command = $application
    ->get('list'));
  $commandTester
    ->execute(array(
    'command' => $command
      ->getName(),
    'namespace' => 'foo',
    '--raw' => true,
  ));
  $output = <<<EOF
foo:bar   The foo:bar command

EOF;
  $this
    ->assertEquals($output, $commandTester
    ->getDisplay(true));
}