Example #1
0
 /**
  * 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;
     }
 }
Example #2
0
 /**
  * Cache Throws Exception for invalid configuration
  * @expectedException \Bluz\Common\Exception\ConfigurationException
  */
 public function testCacheWithEmptyConfigurationThrowsException()
 {
     $cache = new Cache();
     $cache->setOptions(array());
 }