addCommandConfig() public method

Adds a command configuration to the application.
See also: beginCommand()
public addCommandConfig ( CommandConfig $config ) : static
$config CommandConfig The command configuration.
return static The current instance.
 public function testHasCommandConfigs()
 {
     $this->assertFalse($this->config->hasCommandConfigs());
     $this->config->addCommandConfig($config = new CommandConfig());
     $this->assertTrue($this->config->hasCommandConfigs());
 }
 /**
  * @expectedException \Webmozart\Console\Api\Command\CannotAddCommandException
  */
 public function testFailIfDuplicateCommandName()
 {
     $this->config->addCommandConfig(new CommandConfig('command'));
     $this->config->addCommandConfig(new CommandConfig('command'));
     new ConsoleApplication($this->config);
 }