Update tests for meta-information methods

This commit is contained in:
Timothy Warren 2012-04-09 09:57:21 -04:00
parent 724e09371a
commit 4225dfa6e6
6 changed files with 51 additions and 5 deletions

View File

@ -84,5 +84,25 @@ class MySQLTest extends DBTest {
$this->assertTrue(in_array('create_test', $dbs));
}
function TestGetSchemas()
{
$this->assertFalse($this->db->get_schemas());
}
function TestGetsProcedures()
{
$this->assertTrue(is_array($this->db->get_procedures()));
}
function TestGetTriggers()
{
$this->assertTrue(is_array($this->db->get_triggers()));
}
function TestGetSequences()
{
$this->assertFalse($this->db->get_sequences());
}
}

View File

@ -12,7 +12,7 @@
// --------------------------------------------------------------------------
class ODBCQBTest extends QBTest {
class ODBCQBTest extends UnitTestCase {
function TestExists()
{

View File

@ -101,4 +101,24 @@ class PgTest extends DBTest {
$this->assertTrue(in_array('create_test', $dbs));
}
function TestGetSchemas()
{
$this->assertTrue(is_array($this->db->get_schemas()));
}
function TestGetSequences()
{
$this->assertTrue(is_array($this->db->get_sequences()));
}
function TestGetsProcedures()
{
$this->assertTrue(is_array($this->db->get_procedures()));
}
function TestGetTriggers()
{
$this->assertTrue(is_array($this->db->get_triggers()));
}
}

View File

@ -165,4 +165,9 @@ SQL;
{
$this->assertFalse($this->db->get_dbs());
}
function TestGetSchemas()
{
$this->assertFalse($this->db->get_schemas());
}
}

View File

@ -314,12 +314,13 @@ abstract class QBTest extends UnitTestCase {
$this->assertIsA($query, 'PDOStatement');
}
function TestGetDBs()
function TestGetViews()
{
$this->assertTrue(is_array($this->db->get_dbs()));
if (empty($this->db)) return;
$this->assertTrue(is_array($this->db->get_views()));
}
}
// End of parent.php

Binary file not shown.