Skip to content

Commit 9825865

Browse files
committed
Extended Button Test for empty row() function
1 parent 832a2c6 commit 9825865

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/Unit/InlineKeyboardTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@
2525
it('can has multiple buttons', function () {
2626
$keyboard = InlineKeyboardMarkup::make()
2727
->button(InlineKeyboardButton::make()->text('Button A'))
28-
->button(InlineKeyboardButton::make()->text('Button B'));
28+
->button(InlineKeyboardButton::make()->text('Button B'))
29+
->row()
30+
->button(InlineKeyboardButton::make()->text('Button C'))
31+
->button(InlineKeyboardButton::make()->text('Button D'));
2932
$json = json_encode($keyboard);
3033

3134
expect($json)->json()->toMatchArray([
3235
'inline_keyboard' => [
3336
[
3437
['text' => 'Button A'],
3538
['text' => 'Button B'],
39+
], [
40+
['text' => 'Button C'],
41+
['text' => 'Button D'],
3642
]
3743
]
3844
]);

tests/Unit/ReplyKeyboardTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,20 @@
4343
it('can has multiple buttons', function () {
4444
$keyboard = ReplyKeyboardMarkup::make()
4545
->button(KeyboardButton::make()->text('Button A'))
46-
->button(KeyboardButton::make()->text('Button B'));
46+
->button(KeyboardButton::make()->text('Button B'))
47+
->row()
48+
->button(KeyboardButton::make()->text('Button C'))
49+
->button(KeyboardButton::make()->text('Button D'));
4750
$json = json_encode($keyboard);
4851

4952
expect($json)->json()->toMatchArray([
5053
'keyboard' => [
5154
[
5255
['text' => 'Button A'],
5356
['text' => 'Button B'],
57+
], [
58+
['text' => 'Button C'],
59+
['text' => 'Button D'],
5460
]
5561
]
5662
]);

0 commit comments

Comments
 (0)