Add unit tests and abstract bot method execution framework

This commit is contained in:
netkas 2024-09-30 02:34:07 -04:00
parent 69f7ff6a5a
commit 7aa6be4e9a
3 changed files with 170 additions and 0 deletions

View file

@ -0,0 +1,19 @@
<?php
namespace TgBotLib\Enums;
use TgBotLib\Bot;
use TgBotLib\Methods\GetMe;
enum Methods : string
{
case GET_ME = 'getMe';
public function execute(Bot $bot, array $parameters=[]): mixed
{
return match($this)
{
self::GET_ME => GetMe::execute($bot, $parameters),
};
}
}