Skip to content

Commit

Permalink
Merge pull request #15 from PhantPHP/collection-paginated-add-getters
Browse files Browse the repository at this point in the history
Tests Add getters to collection paginated
  • Loading branch information
lennyrouanet authored Sep 30, 2022
2 parents 0a39f0c + 0873913 commit 9a7d469
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/Abstract/CollectionPaginatedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ public function testInterface(): void
$this->assertEquals(false, $collection->isEmpty());
$this->assertEquals(2, $collection->getNbItems());

$this->assertIsInt($collection->getItemByPage());
$this->assertEquals(2, $collection->getItemByPage());

$this->assertIsInt($collection->getItemTotal());
$this->assertEquals(3, $collection->getItemTotal());

$this->assertIsInt($collection->getItemPage());
$this->assertEquals(2, $collection->getItemPage());

$this->assertIsInt($collection->getPageCurrent());
$this->assertEquals(1, $collection->getPageCurrent());

$this->assertIsInt($collection->getPageTotal());
$this->assertEquals(2, $collection->getPageTotal());

$this->assertIsObject($collection->getByKey(0));

foreach ($collection->itemsIterator() as $item) {
Expand Down

0 comments on commit 9a7d469

Please sign in to comment.