I assume you aren't showing the complete code as your test does not do anything?
And show the code you are testing
Hi all! I am trying to create a test, which will make file cache and test if it exist. According to Laravel Docs I make this code:
public function testCache()
{
Cache::shouldReceive('remember')
->once()
->with(md5(1), 120, Closure::class)
->andReturn('Closure');
}
But getting error:
Method remember('c4ca4238a0b923820dcc509a6f75849b', 120, 'Closure') from
Mockery_0_Illuminate_Cache_CacheManager should be called exactly 1 times but called 0 times.
What am I doing wrong? Where to get docs about shouldReceive and what I must put to the andReturn ?
Thanks for responds!
Please or to participate in this conversation.