public function testSet() { $redis = M::mock(Redis::class); $pipe = M::mock('pipe'); $pipe->shouldReceive('setex')->with('a', 86400, '[1,2]'); $pipe->shouldReceive('setex')->with('c', 86400, '[]'); $pipe->shouldReceive('execute'); $redis->shouldReceive('pipeline')->andReturn($pipe); $cache = new RedisCache($redis); $cache->set(['a' => [1, 2], 'b' => null, 'c' => []]); }