if ($this->configModel->isConnected()) {
$config = $this->configModel->get($cat, $key);
if (isset($config)) {
- $this->configCache->set($cat, $key, $config);
+ $this->configCache->set($cat, $key, $config, Cache::SOURCE_DB);
}
}
}
}
// set the cache first
- $cached = $this->configCache->set($cat, $key, $value);
+ $cached = $this->configCache->set($cat, $key, $value, Cache::SOURCE_DB);
// If there is no connected adapter, we're finished
if (!$this->configModel->isConnected()) {
return $cacheRemoved || $storeRemoved;
}
+
+ public function testSetDouble()
+ {
+ $this->configModel->shouldReceive('isConnected')
+ ->andReturn(true);
+
+ // constructor loading
+ $this->configModel->shouldReceive('load')
+ ->with('config')
+ ->andReturn(['config' => ['test' => 'it']])
+ ->once();
+
+ parent::testSetDouble();
+ }
}