/** * Test load method key not found exception */ public function testLoadKeyNotFound() { $this->memoryCacheMock->hasKey(self::KEY)->once()->andReturn(false); $this->memoryCacheMock->load(self::KEY)->never(); $this->memoryCacheMock->freeze(); $this->fileCacheMock->hasKey(self::KEY)->once()->andReturn(false); $this->fileCacheMock->load(self::KEY)->never(); $this->fileCacheMock->freeze(); $smartCache = new SmartCache($this->fileCacheMock, $this->memoryCacheMock); $this->setExpectedException('Hadamcik\\SmartCache\\KeyNotFoundException'); $smartCache->load(self::KEY); }