From e4ff11c0059eddcad51729398ba7c2e498436613 Mon Sep 17 00:00:00 2001 From: netkas Date: Mon, 7 Oct 2024 11:53:25 -0400 Subject: [PATCH] Refactor BotTest to use getMe method --- tests/TgBotLib/BotTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/TgBotLib/BotTest.php b/tests/TgBotLib/BotTest.php index 1932fd6..73fb4fa 100644 --- a/tests/TgBotLib/BotTest.php +++ b/tests/TgBotLib/BotTest.php @@ -2,6 +2,7 @@ namespace TgBotLib; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; class BotTest extends TestCase @@ -16,13 +17,9 @@ class BotTest extends TestCase * Test sendRequest method of Bot class * for valid method and parameters. */ - public function testSendRequestValid(): void + public function getMeTest(): void { - $method = 'getMe'; - $parameters = ['text' => 'test message']; - - // assuming that sendMessage method is properly working - $result = $this->bot->sendRequest($method, $parameters); + $result = $this->bot->getMe(); $this->assertIsArray($result); }