Skip to content

Commit 2e1ae1f

Browse files
author
eldarQa
committed
Fix tests
1 parent c1123a7 commit 2e1ae1f

File tree

4 files changed

+63
-58
lines changed

4 files changed

+63
-58
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
},
2929
"require-dev": {
3030
"jakub-onderka/php-parallel-lint": "^0.9.2",
31-
"phpunit/phpunit": "^9.3.8",
31+
"php-parallel-lint/php-parallel-lint": "v1.2.0",
32+
"phpunit/phpunit": "^9.5.2",
3233
"squizlabs/php_codesniffer": "^3.0"
3334
},
3435
"autoload": {

composer.lock

Lines changed: 58 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/InlineKeyboardPagination.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ protected function generateRange(): array
331331
if ($this->forceButtonCount) {
332332
$from = $this->selectedPage - floor($numberOfIntermediateButtons / 2);
333333
$to = $this->selectedPage + ceil(
334-
$numberOfIntermediateButtons / 2
335-
) + ($this->selectedPage === 3 && $this->maxButtons > 5);
334+
$numberOfIntermediateButtons / 2
335+
) + ($this->selectedPage === 3 && $this->maxButtons > 5);
336336
} else {
337337
$from = $this->selectedPage - 1;
338338
$to = $this->selectedPage + ($this->selectedPage === 3 ? $numberOfIntermediateButtons - 1 : 2);

tests/InlineKeyboardPaginationTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public function testInvalidConstructor()
6565

6666
$ikp = new InlineKeyboardPagination($this->items, $this->command, 10000, $this->itemsPerPage);
6767
$ikp->getPagination();
68-
6968
}
7069

7170
public function testEmptyItemsConstructor()
@@ -229,7 +228,7 @@ public function testInvalidItemsPerPage()
229228
$this->expectException(
230229
\TelegramBot\InlineKeyboardPagination\Exceptions\InlineKeyboardPaginationException::class
231230
);
232-
231+
233232
$ikp = new InlineKeyboardPagination($this->items, $this->command, $this->selectedPage, 0);
234233
$ikp->getPagination();
235234
}

0 commit comments

Comments
 (0)