1

I have problem with mockup Redis and tags cache I get error Error: Call to a member function get() on null

$cache = Cache::shouldReceive('store->redis')->shouldReceive('tags')
                ->once()->with('tripUpdate')
                ->shouldReceive('get')
                ->once()->with('trip_update_' . 1)
                ->andReturn(json_encode([]));

I want try mockup this code :


       $tag = Cache::store("redis")->tags("tripUpdate");
       $tripUpdateCache = $tag->get('trip_update_' . $tripId);

0 Answers0