Skip to content

Commit 0769663

Browse files
authored
Add updatedPerPageTest (rappasoft#2047)
* Add updatedPerPageTest * Fix styling --------- Co-authored-by: lrljoe <[email protected]>
1 parent ce3abe8 commit 0769663

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/Unit/Traits/Helpers/PaginationHelpersTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,17 @@ 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+
}
205218
}

0 commit comments

Comments
 (0)