getSubCommand() public method

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