getFakeUpdateCommandObject() public static method

Return a fake command object for the passed command text
public static getFakeUpdateCommandObject ( string $command_text ) : Update
$command_text string
return Longman\TelegramBot\Entities\Update
 public function testEchoCommandExecuteWithParameter()
 {
     $text = $this->command->setUpdate(TestHelpers::getFakeUpdateCommandObject('/echo Message!'))->execute()->getResult()->getText();
     $this->assertEquals('Message!', $text);
 }
 public function testHelpCommandExecuteWithParameterValidCommand()
 {
     $text = $this->command->setUpdate(TestHelpers::getFakeUpdateCommandObject('/help echo'))->execute()->getResult()->getText();
     $this->assertContains("Description: Show text\nUsage: /echo <text>", $text);
 }