diff --git a/tests/TgBotLib/BotTest.php b/tests/TgBotLib/BotTest.php index 73fb4fa..76f88f2 100644 --- a/tests/TgBotLib/BotTest.php +++ b/tests/TgBotLib/BotTest.php @@ -20,7 +20,6 @@ class BotTest extends TestCase public function getMeTest(): void { $result = $this->bot->getMe(); - $this->assertIsArray($result); } diff --git a/tests/autoload.php b/tests/autoload.php deleted file mode 100644 index 1fbe9fb..0000000 --- a/tests/autoload.php +++ /dev/null @@ -1,10 +0,0 @@ - - $data = str_replace('/hash ', '', $update->getMessage()?->getText()); - $bot->sendMessage( - $update->getMessage()?->getChat()?->getId(), md5($data) - ); - } - } \ No newline at end of file diff --git a/tests/commands/StartCommand.php b/tests/commands/StartCommand.php deleted file mode 100644 index c2a08f7..0000000 --- a/tests/commands/StartCommand.php +++ /dev/null @@ -1,25 +0,0 @@ -sendMessage( - $update->getMessage()?->getChat()?->getId(), 'Hello, ' . $update->getMessage()?->getFrom()?->getFirstName() - ); - } - } \ No newline at end of file diff --git a/tests/currency_test.php b/tests/currency_test.php deleted file mode 100644 index bd0f21e..0000000 --- a/tests/currency_test.php +++ /dev/null @@ -1,8 +0,0 @@ -'); - \TamerLib\tm::initialize(\TamerLib\Enums\TamerMode::CLIENT); - \TamerLib\tm::createWorker(8, __DIR__ . DIRECTORY_SEPARATOR . 'worker.php'); - - // Handle updates forever - while(true) - { - foreach ($bot->getUpdates() as $update) - { - \TamerLib\tm::dof('handle_update', [$update]); - } - - \TamerLib\tm::wait(3); - } \ No newline at end of file diff --git a/tests/single_threaded.php b/tests/single_threaded.php deleted file mode 100644 index 92fbe40..0000000 --- a/tests/single_threaded.php +++ /dev/null @@ -1,10 +0,0 @@ -'); - - $bot->setCommandHandler('start', new \commands\StartCommand()); - $bot->setCommandHandler('hash', new \commands\HashCommand()); - - $bot->handleGetUpdates(true); \ No newline at end of file diff --git a/tests/worker.php b/tests/worker.php deleted file mode 100644 index 6aaba39..0000000 --- a/tests/worker.php +++ /dev/null @@ -1,13 +0,0 @@ -'); - - $bot->setCommandHandler('start', new \commands\StartCommand()); - $bot->setCommandHandler('hash', new \commands\HashCommand()); - - \TamerLib\tm::initialize(\TamerLib\Enums\TamerMode::WORKER); - \TamerLib\tm::addFunction('handle_update', [$bot, 'handleUpdate']); - \TamerLib\tm::run(); \ No newline at end of file