Skip to content

Commit

Permalink
Add additional test for pagination when no perPage given (#14431)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnabialek authored and taylorotwell committed Jul 24, 2016
1 parent 7052197 commit e236a85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Database/DatabaseEloquentIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ public function testPaginatedModelCollectionRetrievalWhenNoElements()
$this->assertEquals(0, $models->count());
}

public function testPaginatedModelCollectionRetrievalWhenNoElementsAndDefaultPerPage()
{
$models = EloquentTestUser::oldest('id')->paginate();

$this->assertEquals(0, $models->count());
$this->assertInstanceOf('Illuminate\Pagination\LengthAwarePaginator', $models);
}

public function testCountForPaginationWithGrouping()
{
EloquentTestUser::create(['id' => 1, 'email' => '[email protected]']);
Expand Down

0 comments on commit e236a85

Please sign in to comment.