You are here

public function CustomDefaultCommandApplication::__construct in Zircon Profile 8

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

Overwrites the constructor in order to set a different default command.

Overrides Application::__construct

File

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

Class

CustomDefaultCommandApplication

Namespace

Symfony\Component\Console\Tests

Code

public function __construct() {
  parent::__construct();
  $command = new \FooCommand();
  $this
    ->add($command);
  $this
    ->setDefaultCommand($command
    ->getName());
}