Adds a command configuration to the application.
public addCommandConfig ( |
||
$config | The command configuration. | |
Résultat | 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); }