Webmozart\Console\ConsoleApplication::getNamedCommands PHP Method

getNamedCommands() public method

public getNamedCommands ( )
    public function getNamedCommands()
    {
        return $this->namedCommands;
    }

Usage Example

Ejemplo n.º 1
0
 public function testGetNamedCommands()
 {
     $this->config->addCommandConfig($config1 = new CommandConfig('command1'));
     $this->config->addCommandConfig($config2 = new CommandConfig('command2'));
     $this->config->addCommandConfig($config3 = new CommandConfig('command3'));
     $config2->markAnonymous();
     $config3->markDefault();
     $application = new ConsoleApplication($this->config);
     $this->assertEquals(new CommandCollection(array(new Command($config1, $application), new Command($config3, $application))), $application->getNamedCommands());
 }