getCommandObject() public method

Get an object instance of the passed command
public getCommandObject ( string $command ) : Command | null
$command string
return Longman\TelegramBot\Commands\Command | null
 public function testGetHelpCommandObject()
 {
     $command = $this->telegram->getCommandObject('help');
     $this->assertInstanceOf('Longman\\TelegramBot\\Commands\\UserCommands\\HelpCommand', $command);
 }