Removed BotTest
This commit is contained in:
parent
5631201880
commit
75acf6aad5
1 changed files with 0 additions and 39 deletions
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace TgBotLib;
|
|
||||||
|
|
||||||
use InvalidArgumentException;
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
|
|
||||||
class BotTest extends TestCase
|
|
||||||
{
|
|
||||||
private $bot;
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
$this->bot = new Bot(BOT_TOKEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sendRequest method of Bot class
|
|
||||||
* for valid method and parameters.
|
|
||||||
*/
|
|
||||||
public function getMeTest(): void
|
|
||||||
{
|
|
||||||
$result = $this->bot->getMe();
|
|
||||||
$this->assertIsArray($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sendRequest method of Bot class
|
|
||||||
* for invalid method.
|
|
||||||
*/
|
|
||||||
public function testSendRequestInvalidMethod(): void
|
|
||||||
{
|
|
||||||
$method = 'invalidMethod';
|
|
||||||
$parameters = [];
|
|
||||||
|
|
||||||
$this->expectException(InvalidArgumentException::class);
|
|
||||||
|
|
||||||
$this->bot->sendRequest($method, $parameters);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue