getSubCommand() public méthode

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