protected function _getCache($params = array()) { $factory_db = new Horde_Test_Factory_Db(); try { $this->db = $factory_db->create(); } catch (Horde_Test_Exception $e) { $this->reason = 'Sqlite not available'; return; } return parent::_getCache($params); }
protected function _getCache($params = array()) { if (!extension_loaded('mysqli')) { $this->reason = 'No mysqli extension'; return; } $config = self::getConfig('CACHE_SQL_MYSQLI_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['cache']['sql']['mysqli'])) { $this->db = new Horde_Db_Adapter_Mysqli($config['cache']['sql']['mysqli']); return parent::_getCache($params); } else { $this->reason = 'No mysqli configuration'; } }
protected function _getCache($params = array()) { if (!extension_loaded('pdo') || !in_array('mysql', PDO::getAvailableDrivers())) { $this->reason = 'No pdo_mysql extension'; return; } $config = self::getConfig('CACHE_SQL_PDO_MYSQL_TEST_CONFIG', __DIR__ . '/../..'); if ($config && !empty($config['cache']['sql']['pdo_mysql'])) { $this->db = new Horde_Db_Adapter_Pdo_Mysql($config['cache']['sql']['pdo_mysql']); return parent::_getCache($params); } else { $this->reason = 'No pdo_mysql configuration'; } }