| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 28 | 
| Code Lines | 18 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 12 | public function test_request_creation(): void  | 
            ||
| 13 |     { | 
            ||
| 14 | TelegramTest::loadEnvironment();  | 
            ||
| 15 | Telegram::setToken($_ENV['TELEGRAM_BOT_TOKEN']);  | 
            ||
| 16 | |||
| 17 |         $result = Request::create('sendMessage', [ | 
            ||
| 18 | 'chat_id' => '259760855',  | 
            ||
| 19 | 'text' => 'text',  | 
            ||
| 20 | 'parse_mode' => 'Markdown',  | 
            ||
| 21 | ]);  | 
            ||
| 22 | |||
| 23 | $expected = [  | 
            ||
| 24 |             'url' => "https://api.telegram.org/bot{$_ENV['TELEGRAM_BOT_TOKEN']}/sendMessage", | 
            ||
| 25 | 'method' => 'GET',  | 
            ||
| 26 | 'options' => [  | 
            ||
| 27 | 'headers' => [  | 
            ||
| 28 | 'Accept' => 'application/json',  | 
            ||
| 29 | 'User-Agent' => 'TelegramBot-PHP/v1.0.0'  | 
            ||
| 30 | ],  | 
            ||
| 31 | 'query' => [  | 
            ||
| 32 | 'chat_id' => '259760855',  | 
            ||
| 33 | 'text' => 'text',  | 
            ||
| 34 | 'parse_mode' => 'Markdown',  | 
            ||
| 35 | ],  | 
            ||
| 36 | ],  | 
            ||
| 37 | ];  | 
            ||
| 38 | |||
| 39 | $this->assertEquals($expected, $result);  | 
            ||
| 40 | }  | 
            ||
| 56 |