You need to define what the mock should return.
$mock->shouldReceive('byPage')->once()->andReturn(...)
Thank you anlutro,
So I have to create 2 new article, hydrate them entirely, push on array, construct my return value with it ?
And how can I set the andReturn for
Paginator::shouldReceive('make')->once();
Yeah bu what I should return, a real Paginator instance ?
How can I instanciate one for tests ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community