public function hasCommandConfig($name) { foreach ($this->commandConfigs as $commandConfig) { if ($name === $commandConfig->getName()) { return true; } } return false; }
public function testHasCommandConfig() { $this->config->addCommandConfig($config = new CommandConfig()); $this->assertFalse($this->config->hasCommandConfig('command')); $this->assertFalse($this->config->hasCommandConfig('foobar')); $config->setName('command'); $this->assertTrue($this->config->hasCommandConfig('command')); $this->assertFalse($this->config->hasCommandConfig('foobar')); }