/** * @param string $key * @return bool */ public function hasKey($key) { if ($this->memoryCache->hasKey($key)) { return true; } return $this->fileCache->hasKey($key); }
/** * @param string $key * @param mixed $value * @dataProvider hasKeyProvider */ public function testHasKey($key, $value) { $this->assertFalse($this->memoryCache->hasKey($key)); $this->memoryCache->save($key, $value); $this->assertTrue($this->memoryCache->hasKey($key)); }