/** * Open a new database connection */ protected function _setUpAdapter() { $this->_db = Zend_Db::factory($this->getDriver(), $this->_util->getParams()); try { $conn = $this->_db->getConnection(); } catch (Zend_Exception $e) { $this->_db = null; $this->assertTrue($e instanceof Zend_Db_Adapter_Exception, 'Expecting Zend_Db_Adapter_Exception, got ' . get_class($e)); $this->markTestSkipped($e->getMessage()); } }
public function getParams(array $constants = array()) { $constants = array('host' => 'TESTS_ZEND_DB_ADAPTER_DB2_HOSTNAME', 'username' => 'TESTS_ZEND_DB_ADAPTER_DB2_USERNAME', 'password' => 'TESTS_ZEND_DB_ADAPTER_DB2_PASSWORD', 'dbname' => 'TESTS_ZEND_DB_ADAPTER_DB2_DATABASE', 'port' => 'TESTS_ZEND_DB_ADAPTER_DB2_PORT'); $params = parent::getParams($constants); if (isset($GLOBALS['TESTS_ZEND_DB_ADAPTER_DB2_DRIVER_OPTIONS'])) { $params['driver_options'] = $GLOBALS['TESTS_ZEND_DB_ADAPTER_DB2_DRIVER_OPTIONS']; } return $params; }
public function getParams(array $constants = array()) { $constants = array( 'host' => 'TESTS_ZEND_DB_ADAPTER_MYSQL_HOSTNAME', 'username' => 'TESTS_ZEND_DB_ADAPTER_MYSQL_USERNAME', 'password' => 'TESTS_ZEND_DB_ADAPTER_MYSQL_PASSWORD', 'dbname' => 'TESTS_ZEND_DB_ADAPTER_MYSQL_DATABASE', 'port' => 'TESTS_ZEND_DB_ADAPTER_MYSQL_PORT' ); return parent::getParams($constants); }
public function getParams(array $constants = array()) { $constants = array('host' => 'TESTS_ZEND_DB_ADAPTER_SQLSRV_HOSTNAME', 'username' => 'TESTS_ZEND_DB_ADAPTER_SQLSRV_USERNAME', 'password' => 'TESTS_ZEND_DB_ADAPTER_SQLSRV_PASSWORD', 'dbname' => 'TESTS_ZEND_DB_ADAPTER_SQLSRV_DATABASE'); $constants = parent::getParams($constants); return $constants; }