hasSubCommandConfig() public method

Returns whether the command has a sub-command with a given name.
See also: beginSubCommand()
public hasSubCommandConfig ( string $name ) : boolean
$name string The name of the sub-command.
return boolean Returns `true` if the sub-command configuration with the given name exists and `false` otherwise.
Ejemplo n.º 1
0
 public function testHasSubCommandConfig()
 {
     $this->config->addSubCommandConfig($config = new SubCommandConfig());
     $this->assertFalse($this->config->hasSubCommandConfig('command'));
     $this->assertFalse($this->config->hasSubCommandConfig('foobar'));
     $config->setName('command');
     $this->assertTrue($this->config->hasSubCommandConfig('command'));
     $this->assertFalse($this->config->hasSubCommandConfig('foobar'));
 }