Inheritance: extends Content_Test_Base
Beispiel #1
0
 public static function setUpBeforeClass()
 {
     $factory_db = new Horde_Test_Factory_Db();
     try {
         self::$db = $factory_db->create();
         parent::setUpBeforeClass();
     } catch (Horde_Test_Exception $e) {
         self::$reason = 'Sqlite not available';
     }
 }
Beispiel #2
0
 public static function setUpBeforeClass()
 {
     if (!extension_loaded('mysqli')) {
         self::$reason = 'No mysqli extension';
         return;
     }
     $config = self::getConfig('CONTENT_SQL_MYSQLI_TEST_CONFIG', __DIR__ . '/..');
     if ($config && !empty($config['content']['sql']['mysqli'])) {
         self::$db = new Horde_Db_Adapter_Mysqli($config['content']['sql']['mysqli']);
         parent::setUpBeforeClass();
     }
 }
Beispiel #3
0
 public static function setUpBeforeClass()
 {
     if (!extension_loaded('pdo') || !in_array('mysql', PDO::getAvailableDrivers())) {
         self::$reason = 'No mysql extension or no mysql PDO driver';
         return;
     }
     $config = self::getConfig('CONTENT_SQL_PDO_MYSQL_TEST_CONFIG', __DIR__ . '/../..');
     if ($config && !empty($config['content']['sql']['pdo_mysql'])) {
         self::$db = new Horde_Db_Adapter_Pdo_Mysql($config['content']['sql']['pdo_mysql']);
         parent::setUpBeforeClass();
     }
 }
Beispiel #4
0
 public static function tearDownAfterClass()
 {
     if (self::$migrator) {
         self::$migrator->down();
     }
     self::$db = null;
     parent::tearDownAfterClass();
 }