Returns whether the application has a command with a given name.
public hasCommandConfig ( string $name ) : boolean | ||
$name | string | The name of the command. |
Результат | boolean | Returns `true` if the command configuration with the given name exists and `false` otherwise. |
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')); }