/**
  * Get database connection which will be used by PHPUnit
  * for clean-up and fixture loading into the test DB.
  *
  * @return PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
  */
 public final function getConnection()
 {
     $this->factory = NDB_Factory::singleton();
     if ($this->_conn === null) {
         if (self::$_pdo == null) {
             self::$_pdo = new PDO('mysql:dbname=' . $this->factory->settings()->dbName() . ';
                 host=' . $this->factory->settings()->dbHost(), $this->factory->settings()->dbUserName(), $this->factory->settings()->dbPassword());
         }
         $this->_conn = $this->createDefaultDBConnection(self::$_pdo);
     }
     return $this->_conn;
 }
 /**
  * Get database connection which will be used by PHPUnit
  * for clean-up and fixture loading into the test DB.
  *
  * @return PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
  */
 public final function getConnection()
 {
     $this->factory = NDB_Factory::singleton();
     $this->config = $this->factory->Config(CONFIG_XML);
     $database = $this->config->getSetting('database');
     if ($this->_conn === null) {
         if (self::$_pdo == null) {
             self::$_pdo = new PDO('mysql:dbname=' . $database['database'] . ';host=' . $database['host'], $database['username'], $database['password']);
         }
         $this->_conn = $this->createDefaultDBConnection(self::$_pdo);
     }
     return $this->_conn;
 }
 /**
  * Setup test
  *
  * @throws Exception
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->createLorisDBConnection();
     $this->_feedbackObj = NDB_BVL_Feedback::singleton("karo_test", null, 11);
 }