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());
}