예제 #1
0
파일: TestSetup.php 프로젝트: jsnshrmn/Suma
 /**
  * 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());
     }
 }
예제 #2
0
 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;
 }
예제 #3
0
 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);
 }
예제 #4
0
파일: Sqlsrv.php 프로젝트: netvlies/zf
 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;
 }