Returns the sub-command with a specific name.
public getSubCommand ( string $name ) : |
||
$name | string | The name of the sub-command. |
return | The sub-command. |
/** * @expectedException \Webmozart\Console\Api\Command\NoSuchCommandException * @expectedExceptionMessage foobar */ public function testGetSubCommandFailsIfNotFound() { $command = new Command(new CommandConfig('command')); $command->getSubCommand('foobar'); }