Author: Michael J Rubinsky (mrubinsk@horde.org)
Author: Jan Schneider (jan@horde.org)
Inheritance: extends Horde_History_Sql_Base
コード例 #1
0
ファイル: MysqliTest.php プロジェクト: horde/horde
 public static function setUpBeforeClass()
 {
     if (!extension_loaded('mysqli')) {
         self::$reason = 'No mysqli extension';
         return;
     }
     $config = self::getConfig('HISTORY_SQL_MYSQLI_TEST_CONFIG', __DIR__ . '/..');
     if ($config && !empty($config['history']['sql']['mysqli'])) {
         self::$db = new Horde_Db_Adapter_Mysqli($config['history']['sql']['mysqli']);
         parent::setUpBeforeClass();
     } else {
         self::$reason = 'No mysqli configuration';
     }
 }
コード例 #2
0
ファイル: MysqliTest.php プロジェクト: jubinpatel/horde
 public static function setUpBeforeClass()
 {
     if (!extension_loaded('mysqli')) {
         self::$reason = 'No mysqli extension';
         return;
     }
     $config = self::getConfig('HISTORY_SQL_MYSQLI_TEST_CONFIG', __DIR__ . '/..');
     if ($config && !empty($config['history']['sql']['mysqli'])) {
         self::$db = new Horde_Db_Adapter_Mysqli($config['history']['sql']['mysqli']);
         $dir = dirname(__FILE__) . '/../../../../migration/Horde/History';
         if (!is_dir($dir)) {
             error_reporting(E_ALL & ~E_DEPRECATED);
             $dir = PEAR_Config::singleton()->get('data_dir', null, 'pear.horde.org') . '/Horde_History/migration';
             error_reporting(E_ALL | E_STRICT);
         }
         self::$logger = new Horde_Test_Log();
         self::$migrator = new Horde_Db_Migration_Migrator(self::$db, self::$logger->getLogger(), array('migrationsPath' => $dir, 'schemaTableName' => 'horde_histories_schema'));
         self::$history = new Horde_History_Sql('test_user', self::$db);
     } else {
         self::$reason = 'No mysqli configuration';
     }
 }