示例#1
0
 /**
  * @test
  */
 public function getOnSecondaryCacheIsNeverCalledWhenValueIsPresentInFirstLevelCache()
 {
     $this->secondLevelCacheMock->expects($this->never())->method('get');
     // when we add a value with the identifier to the two level cache, the second level
     // cache should not be asked because the value should allready be found in the first
     // level cache
     $this->twoLevelCache->set('foo', 'bar');
     $value = $this->twoLevelCache->get('foo');
     $this->assertSame($value, 'bar', 'Did not get expected value from two level cache');
 }