$ vendor/bin/phpunit tests/integration/repositories/EloquentRepositoryTest.php
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.
.E 2 / 2 (100%)
Time: 1.21 seconds, Memory: 8.00MB
There was 1 error:
Error: Call to a member function get() on null
/vendor/illuminate/http/Request.php:612
/vendor/illuminate/http/Request.php:521
/vendor/illuminate/http/Request.php:696
/vendor/illuminate/http/Request.php:664
/vendor/illuminate/http/Request.php:335
/vendor/illuminate/pagination/PaginationServiceProvider.php:41
/vendor/illuminate/pagination/AbstractPaginator.php:353
/vendor/illuminate/database/Eloquent/Builder.php:473
/vendor/illuminate/database/Eloquent/Model.php:3538
/vendor/illuminate/database/Eloquent/Model.php:3552
/app/Repositories/EloquentRepository.php:54
"You should not mock the Request facade. Instead, pass the input you desire into the HTTP helper methods such as call and post when running your test. Likewise, instead of mocking the Config facade, simply call the Config::set method in your tests."
I am trying to test a repository, It tries to get the per page for pagination limit directly from the request also Laravel's paginations also gets the page number in the same way. I don't know a way in which I can pass request parameters when only testing a repository. Can you please help me if there is any way out.