hasCommandConfig() public method

Returns whether the application has a command with a given name.
See also: beginCommand()
public hasCommandConfig ( string $name ) : boolean
$name string The name of the command.
return boolean Returns `true` if the command configuration with the given name exists and `false` otherwise.
コード例 #1
0
 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'));
 }