Exemplo n.º 1
0
 /**
  * @preserveGlobalState disabled
  * @runInSeparateProcess
  */
 public function test_connect()
 {
     $this->assertFalse(Hm_DB::connect($this->config));
     setup_db($this->config);
     $this->assertEquals('object', gettype(Hm_DB::connect($this->config)));
     $this->assertEquals('object', gettype(Hm_DB::connect($this->config)));
 }
Exemplo n.º 2
0
 /**
  * Create a new or re-use an existing DB connection
  * @return bool true if the connection is available
  */
 protected function connect()
 {
     $this->dbh = Hm_DB::connect($this->site_config);
     if ($this->dbh) {
         return true;
     }
     return false;
 }