Fix some tests

This commit is contained in:
Timothy Warren 2012-04-02 10:52:46 -04:00
parent fdc37f8819
commit 96ada089ee
6 changed files with 78 additions and 60 deletions

View File

@ -20,7 +20,7 @@
*/ */
class DB_Reg { class DB_Reg {
private static $instance; private static $instance=array();
/** /**
* Registry access method * Registry access method

View File

@ -180,7 +180,25 @@ class Connection_Sidebar extends GtkVBox {
*/ */
public function set_status_icon($col, $cell, $model, $iter) public function set_status_icon($col, $cell, $model, $iter)
{ {
$col->set_reorderable(TRUE);
$info = $model->get_value($iter, 0);
list($width, $height) = Gtk::icon_size_lookup(Gtk::ICON_SIZE_SMALL_TOOLBAR);
$conns = DB_Reg::get_connections();
/*if(in_array($info->name, $conns))
{
$img = new GTKImage();
$img->set_from_stock(GTK::STOCK_YES, Gtk::ICON_SIZE_SMALL_TOOLBAR);
$cell->set_property('pixbuf', $img->get_pixbuf());
}
else
{
$img = new GTKImage();
$img->set_from_stock(GTK::STOCK_NO, Gtk::ICON_SIZE_SMALL_TOOLBAR);
$cell->set_property('pixbuf', $img->get_pixbuf());
}*/
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ class MySQLQBTest extends QBTest {
$params = array( $params = array(
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'port' => '3306', 'port' => '3306',
'database' => 'test', 'conn_db' => 'test',
'user' => 'root', 'user' => 'root',
'pass' => NULL, 'pass' => NULL,
'type' => 'mysql' 'type' => 'mysql'

View File

@ -27,7 +27,7 @@ class MySQLTest extends DBTest {
$params = json_decode(file_get_contents("../test_config.json")); $params = json_decode(file_get_contents("../test_config.json"));
$params = $params->mysql; $params = $params->mysql;
$this->db = new MySQL("host={$params->host};port={$params->port};dbname={$params->database}", $params->user, $params->pass); $this->db = new MySQL("host={$params->host};port={$params->port};dbname={$params->conn_db}", $params->user, $params->pass);
} }
elseif (($var = getenv('CI'))) elseif (($var = getenv('CI')))
{ {

View File

@ -35,7 +35,7 @@ class PgSQLQBTest extends QBTest {
$params = array( $params = array(
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'port' => '5432', 'port' => '5432',
'database' => 'test', 'conn_db' => 'test',
'user' => 'postgres', 'user' => 'postgres',
'pass' => '', 'pass' => '',
'type' => 'pgsql' 'type' => 'pgsql'

View File

@ -32,7 +32,7 @@ class PgTest extends DBTest {
$params = json_decode(file_get_contents("../test_config.json")); $params = json_decode(file_get_contents("../test_config.json"));
$params = $params->pgsql; $params = $params->pgsql;
$this->db = new PgSQL("host={$params->host};port={$params->port};dbname={$params->database}", $params->user, $params->pass); $this->db = new PgSQL("host={$params->host};port={$params->port};dbname={$params->conn_db}", $params->user, $params->pass);
} }
elseif (($var = getenv('CI'))) elseif (($var = getenv('CI')))
{ {