You are here

public function ApplicationTest::testAll in Zircon Profile 8

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

File

vendor/symfony/console/Tests/ApplicationTest.php, line 103

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testAll() {
  $application = new Application();
  $commands = $application
    ->all();
  $this
    ->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands');
  $application
    ->add(new \FooCommand());
  $commands = $application
    ->all('foo');
  $this
    ->assertCount(1, $commands, '->all() takes a namespace as its first argument');
}