Refactor BotTest to use getMe method
This commit is contained in:
parent
96cec88e74
commit
e4ff11c005
1 changed files with 3 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace TgBotLib;
|
namespace TgBotLib;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class BotTest extends TestCase
|
class BotTest extends TestCase
|
||||||
|
@ -16,13 +17,9 @@ class BotTest extends TestCase
|
||||||
* Test sendRequest method of Bot class
|
* Test sendRequest method of Bot class
|
||||||
* for valid method and parameters.
|
* for valid method and parameters.
|
||||||
*/
|
*/
|
||||||
public function testSendRequestValid(): void
|
public function getMeTest(): void
|
||||||
{
|
{
|
||||||
$method = 'getMe';
|
$result = $this->bot->getMe();
|
||||||
$parameters = ['text' => 'test message'];
|
|
||||||
|
|
||||||
// assuming that sendMessage method is properly working
|
|
||||||
$result = $this->bot->sendRequest($method, $parameters);
|
|
||||||
|
|
||||||
$this->assertIsArray($result);
|
$this->assertIsArray($result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue