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.'; } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); if (is_dir(__DIR__ . '/../../../../../../Lock/migration')) { $lockMigrationsPath = __DIR__ . '/../../../../../../Lock/migration'; } elseif (is_dir(__DIR__ . '/../../../../../../deps/Lock/migration')) { $lockMigrationsPath = __DIR__ . '/../../../../../../deps/Lock/migration'; // how would that work for any possible pear_dir ? } else { self::$skip = 'Could not determine path to Horde_Lock migration'; return; } self::$locksMigrator = new Horde_Db_Migration_Migrator(self::$db, null, array('migrationsPath' => $lockMigrationsPath, 'schemaTableName' => 'horde_lock_schema_info')); self::$locksMigrator->up(); self::$locks = new Horde_Lock_Sql(array('db' => self::$db)); self::$auth = new Horde_Auth_Sql(array('db' => self::$db, 'encryption' => 'plain', 'lock_api' => self::$locks)); }