This method can be used to nicely edit a sub-command inherited from a
parent configuration using the fluent API:
php
protected function configure()
{
parent::configure();
$this
->editCommand('server')
->editSubCommand('add')
...
->end()
->end()
...
;
}
public editSubCommand ( string $name ) : |
||
$name | string | The name of the sub-command to edit. |
return | The sub-command configuration. |
public function testChangeSubCommand() { $this->config->addSubCommandConfig($config1 = new SubCommandConfig('command1')); $this->assertSame($config1, $this->config->editSubCommand('command1')); }