/** * Init instance * * @return Instance */ protected static function initInstance() { $config = Config::getData('cache'); if (!$config || !isset($config['enabled']) || !$config['enabled']) { return new Nil(); } else { $instance = new Instance(); $instance->setOptions($config); return $instance; } }
/** * Cache Throws Exception for invalid configuration * @expectedException \Bluz\Common\Exception\ConfigurationException */ public function testCacheWithEmptyConfigurationThrowsException() { $cache = new Cache(); $cache->setOptions(array()); }