저자: Jan Schneider (jan@horde.org)
상속: extends Horde_Cache_TestBase
예제 #1
0
파일: SqliteTest.php 프로젝트: horde/horde
 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);
 }
예제 #2
0
파일: MysqliTest.php 프로젝트: horde/horde
 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';
     }
 }
예제 #3
0
파일: MysqlTest.php 프로젝트: horde/horde
 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';
     }
 }