Skip to content

Commit 3dc0b0c

Browse files
committed
Prevent risky tests, fix tests to start off with an empty $_GET.
1 parent f7b3099 commit 3dc0b0c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/TelegramBotManager/Tests/BotManagerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public function testSomeVitalsFail()
8383
public function testVitalsSuccess()
8484
{
8585
new BotManager(ParamsTest::$demo_vital_params);
86+
self::assertTrue(true);
8687
}
8788

8889
public function testValidTelegramObject()
@@ -143,6 +144,8 @@ public function testValidateSecretSuccess()
143144
(new BotManager(array_merge(ParamsTest::$demo_vital_params, [
144145
'secret' => 'my_secret_12345',
145146
])))->validateSecret();
147+
148+
self::assertTrue(true);
146149
}
147150

148151
public function testValidateAndSetWebhookSuccess()

tests/TelegramBotManager/Tests/ParamsTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,16 @@ class ParamsTest extends \PHPUnit\Framework\TestCase
5151
'custom_input' => '{"some":"raw", "json":"update"}',
5252
];
5353

54+
public function setUp()
55+
{
56+
// Make sure we start with a clean slate.
57+
$_GET = [];
58+
}
59+
5460
public function testConstruct()
5561
{
5662
new Params(self::$demo_vital_params);
63+
self::assertTrue(true);
5764
}
5865

5966
/**

0 commit comments

Comments
 (0)