/** * Returns the test database connection. * * @return PHPUnit_Extensions_Database_DB_IDatabaseConnection */ protected function getConnection() { if ($this->_sqlConnection == null) { $config = Zend_Registry::get('config')->toArray(); $connection = Zend_Db::factory($config['db']['adapter'], $config['db']); $this->_sqlConnection = $this->createZendDbConnection($connection, 'test'); Zend_Db_Table_Abstract::setDefaultAdapter($connection); $this->_adapter = new Ext_HandlerSocket_Adapter_Pecl($config['hs']['params']); Ext_HandlerSocket_IndexAbstract::setDefaultAdapter($this->_adapter); } return $this->_sqlConnection; }