Skip to content

Commit f7b3099

Browse files
committed
Set correct format for API keys, necessary for Telegram Bot 0.42.0+.
1 parent 834b387 commit f7b3099

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/TelegramBotManager/Tests/BotManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function testNoVitalsFail()
7777
*/
7878
public function testSomeVitalsFail()
7979
{
80-
new BotManager(['api_key' => 'abc123', 'botname' => 'testbot']);
80+
new BotManager(['api_key' => '12345:api_key', 'botname' => 'testbot']);
8181
}
8282

8383
public function testVitalsSuccess()

tests/TelegramBotManager/Tests/ParamsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ParamsTest extends \PHPUnit\Framework\TestCase
1818
* @var array Demo vital parameters.
1919
*/
2020
public static $demo_vital_params = [
21-
'api_key' => 'api_key_12345',
21+
'api_key' => '12345:api_key',
2222
'botname' => 'test_bot',
2323
'secret' => 'secret_12345',
2424
];
@@ -75,7 +75,7 @@ public function testConstructWithoutApiKey()
7575
public function testConstructWithoutBotname()
7676
{
7777
new Params([
78-
'api_key' => 'api_key_12345',
78+
'api_key' => '12345:api_key',
7979
'secret' => 'secret_12345',
8080
]);
8181
}
@@ -87,7 +87,7 @@ public function testConstructWithoutBotname()
8787
public function testConstructWithoutSecret()
8888
{
8989
new Params([
90-
'api_key' => 'api_key_12345',
90+
'api_key' => '12345:api_key',
9191
'botname' => 'test_bot',
9292
]);
9393
}

0 commit comments

Comments
 (0)