Level 1
Solved by using withAnyArgs() instead of with()
Summer Sale! All accounts are 50% off this week.
I need to mock a facade while testing and I found in laravel documentation that I can do it like this
Cache::shouldReceive('get')
->once()
->with('key')
->andReturn('value');
The idea is I don't want to pass with('key') for some reason. can I make it work without giving it the parameters to be passed?
Solved by using withAnyArgs() instead of with()
Please or to participate in this conversation.