public function addSubCommandConfig(SubCommandConfig $config) { // The name is dynamic, so don't store by name $this->subCommandConfigs[] = $config; $config->setParentConfig($this); return $this; }
public function testEditOptionCommand() { $this->config->addSubCommandConfig($config1 = new OptionCommandConfig('command1', 'a')); $this->assertSame($config1, $this->config->editOptionCommand('command1')); }