get() public method

public get ( $keys )
示例#1
0
文件: CacheTest.php 项目: angejia/pea
 public function testGet()
 {
     $redis = M::mock(Redis::class);
     $redis->shouldReceive('mget')->with(['a', 'b', 'c'])->andReturn([1, "null", '[]']);
     $cache = new RedisCache($redis);
     $result = $cache->get(['a', 'b', 'c']);
     $this->assertEquals(['a' => 1, 'c' => []], $result);
 }