Property | Type | Description | |
---|---|---|---|
$chat_template | array | Data template of a chat. | |
$user_template | array | Data template of a user. |
Method | Description | |
---|---|---|
emptyDB ( array $credentials ) | Empty all tables for the passed database | |
getFakeChatObject ( array $data = [] ) : |
Return a fake chat object. | |
getFakeMessageObject ( array $message_data = [], array $user_data = [], array $chat_data = [] ) : |
Return a fake message object using the passed ids. | |
getFakeRecordedAudio ( ) : array | Get fake recorded audio track | |
getFakeUpdateCommandObject ( string $command_text ) : |
Return a fake command object for the passed command text | |
getFakeUpdateObject ( array $data = null ) : |
Return a simple fake Update object | |
getFakeUserObject ( array $data = [] ) : Longman\TelegramBot\Entities\User | Return a fake user object. | |
setObjectProperty ( object $object, string $property, mixed $value ) | Set the value of a private/protected property of an object | |
setStaticProperty ( string $class, string $property, mixed $value ) | Set the value of a private/protected static property of a class | |
startFakeConversation ( ) : array | Start a fake conversation for the passed command and return the randomly generated ids. |
public static getFakeChatObject ( array $data = [] ) : |
||
$data | array | Pass custom data array if needed |
return |
public static getFakeMessageObject ( array $message_data = [], array $user_data = [], array $chat_data = [] ) : |
||
$message_data | array | Pass custom message data array if needed |
$user_data | array | Pass custom user data array if needed |
$chat_data | array | Pass custom chat data array if needed |
return |
public static getFakeRecordedAudio ( ) : array | ||
return | array |
public static getFakeUpdateCommandObject ( string $command_text ) : |
||
$command_text | string | |
return |
public static getFakeUpdateObject ( array $data = null ) : |
||
$data | array | Pass custom data array if needed |
return |
public static getFakeUserObject ( array $data = [] ) : Longman\TelegramBot\Entities\User | ||
$data | array | Pass custom data array if needed |
return | Longman\TelegramBot\Entities\User |
public static startFakeConversation ( ) : array | ||
return | array |
protected static array $chat_template | ||
return | array |
protected static array $user_template | ||
return | array |