Skip to content

Commit 467b2e8

Browse files
committed
Add updatedPerPageTest
1 parent ce3abe8 commit 467b2e8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Unit/Traits/Helpers/PaginationHelpersTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,18 @@ public function test_can_get_pagination_wrapper_attributes_bag(): void
202202
$this->assertSame((new \Illuminate\View\ComponentAttributeBag(['class' => 'text-lg', 'testval' => '123']))->getAttributes(), $this->basicTable->getPaginationWrapperAttributesBag()->getAttributes());
203203

204204
}
205+
206+
public function test_check_updated_per_page_returns_correctly(): void
207+
{
208+
$rows = $this->basicTable->getRows();
209+
$this->basicTable->setPerPageAccepted([5, 10, 15, 25, 50]);
210+
211+
$this->basicTable->setPerPage(5);
212+
$this->assertSame(5, $this->basicTable->getPerPage());
213+
214+
$this->basicTable->updatedPerPage(15);
215+
$this->assertSame(15, $this->basicTable->getPerPage());
216+
217+
}
218+
205219
}

0 commit comments

Comments
 (0)