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) {
     }
 }
Beispiel #2
0
 public static function setUpBeforeClass()
 {
     $factory_db = new Horde_Test_Factory_Db();
     try {
         self::$_db = $factory_db->create(array('migrations' => array('migrationsPath' => __DIR__ . '/../../../../migration/Horde/Token')));
     } catch (Horde_Test_Exception $e) {
         return;
     }
 }
Beispiel #3
0
 protected function _getBackend()
 {
     $factory_db = new Horde_Test_Factory_Db();
     try {
         $db = $factory_db->create(array('migrations' => array('migrationsPath' => __DIR__ . '/../../../../../migration/Horde/Imap/Client')));
     } catch (Horde_Test_Exception $e) {
         $this->markTestSkipped('Sqlite not available.');
     }
     return new Horde_Imap_Client_Cache_Backend_Db(array('db' => $db, 'hostspec' => self::HOSTSPEC, 'port' => self::PORT, 'username' => self::USERNAME));
 }
Beispiel #4
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 #5
0
 protected function _getBackend()
 {
     $factory_db = new Horde_Test_Factory_Db();
     try {
         $db = $factory_db->create(array('migrations' => array('migrationsPath' => self::$_migrationDir)));
     } catch (Horde_Test_Exception $e) {
         $this->markTestSkipped('Test DB not available.');
     }
     return new Horde_Lock_Sql(array('db' => $db));
 }
Beispiel #6
0
 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);
 }
Beispiel #7
0
 public function setUp()
 {
     $factory_db = new Horde_Test_Factory_Db();
     $this->db = $factory_db->create();
     $this->mapper = new Horde_Rdo_Test_Objects_SimpleMapper($this->db);
     $migration = new Horde_Db_Migration_Base($this->db);
     try {
         $migration->dropTable('horde_rdo_test');
     } catch (Horde_Db_Exception $e) {
     }
     $t = $migration->createTable('horde_rdo_test', array('autoincrementKey' => 'id'));
     $t->column('intprop', 'integer');
     $t->column('textprop', 'string');
     $t->end();
     $migration->migrate('up');
 }