diff --git a/tests/Database/DatabaseEloquentIntegrationTest.php b/tests/Database/DatabaseEloquentIntegrationTest.php index 062090e80ee2..07a4c8ff767d 100644 --- a/tests/Database/DatabaseEloquentIntegrationTest.php +++ b/tests/Database/DatabaseEloquentIntegrationTest.php @@ -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' => 'taylorotwell@gmail.com']);