There was no Mockery expectation defined for scout.softDelete which caused the tests to fail. I added these the the setUp() method.
Faulty paginator
The paginator had a bug that was undetected by the unit test. When using a page size larger than 1, the paginator would have an incorrect offset.
Instead of paginate($startOffset, $numberOfItems), paginate($pageNumber, $numberOfItems) was used. This caused paged results to appear on more than one page, and pages to contain more items than they should actually contain.
This pull request fixes that behavior and the corresponding test.
What does this pull request fix?
Mockery expectations
There was no Mockery expectation defined for
scout.softDelete
which caused the tests to fail. I added these the thesetUp()
method.Faulty paginator
The paginator had a bug that was undetected by the unit test. When using a page size larger than 1, the paginator would have an incorrect offset.
Instead of
paginate($startOffset, $numberOfItems)
,paginate($pageNumber, $numberOfItems)
was used. This caused paged results to appear on more than one page, and pages to contain more items than they should actually contain.This pull request fixes that behavior and the corresponding test.