Skip to content

Commit 8429eaf

Browse files
committed
Unset the live bot webhook using run().
1 parent d569163 commit 8429eaf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/BotManagerTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,17 @@ public function testValidateAndSetWebhookSuccessLiveBot()
217217
self::assertSame('Webhook is already deleted' . PHP_EOL, $output);
218218
}
219219

220+
public function testUnsetWebhookViaRunLiveBot()
221+
{
222+
$_GET = ['a' => 'unset'];
223+
$botManager = new BotManager(array_merge(ParamsTest::$live_params, [
224+
'webhook' => 'https://example.com/hook.php',
225+
]));
226+
$output = $botManager->run()->getOutput();
227+
228+
self::assertRegExp('/Webhook.+deleted/', $output);
229+
}
230+
220231
/**
221232
* @expectedException \InvalidArgumentException
222233
* @expectedExceptionMessage Invalid webhook

0 commit comments

Comments
 (0)