/** * List databases * * @return array */ public function list_databases() { if (isset($this->db->data_cache['db_names'])) { return $this->db->data_cache['db_names']; } return $this->db->data_cache['db_names'] = cubrid_list_dbs($this->db->conn_id); }
public function listDatabases() { if (!empty($this->connect)) { return cubrid_list_dbs($this->connect); } else { return false; } }
/** * @group arnia-wrong-parameters-count */ public function testCubridListDbs2() { if (OUTPUT_FUNCTION_NAME == true) { echo "\r\nRunning: " . __FUNCTION__ . " = "; } try { $dbs = cubrid_list_dbs(); $this->assertTrue(FALSE, "Expected Exception not thrown."); } catch (Exception $e) { //echo $e->getMessage(); $this->assertEquals(0, cubrid_error_code()); $this->assertEquals(0, cubrid_error_code_facility()); $this->assertEquals('', cubrid_error_msg()); } }