From 4225dfa6e604cace83d5718b32cd0ca827a50990 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 9 Apr 2012 09:57:21 -0400 Subject: [PATCH] Update tests for meta-information methods --- tests/databases/mysql.php | 20 ++++++++++++++++++++ tests/databases/odbc-qb.php | 2 +- tests/databases/pgsql.php | 20 ++++++++++++++++++++ tests/databases/sqlite.php | 5 +++++ tests/parent.php | 9 +++++---- tests/test_dbs/FB_TEST_DB.FDB | Bin 802816 -> 802816 bytes 6 files changed, 51 insertions(+), 5 deletions(-) diff --git a/tests/databases/mysql.php b/tests/databases/mysql.php index 847962e..9cb249b 100644 --- a/tests/databases/mysql.php +++ b/tests/databases/mysql.php @@ -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()); + } } diff --git a/tests/databases/odbc-qb.php b/tests/databases/odbc-qb.php index 26022da..ea35a20 100644 --- a/tests/databases/odbc-qb.php +++ b/tests/databases/odbc-qb.php @@ -12,7 +12,7 @@ // -------------------------------------------------------------------------- -class ODBCQBTest extends QBTest { +class ODBCQBTest extends UnitTestCase { function TestExists() { diff --git a/tests/databases/pgsql.php b/tests/databases/pgsql.php index 764f4f1..dabd0e8 100644 --- a/tests/databases/pgsql.php +++ b/tests/databases/pgsql.php @@ -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())); + } } \ No newline at end of file diff --git a/tests/databases/sqlite.php b/tests/databases/sqlite.php index a7ff9fe..3a2d62c 100644 --- a/tests/databases/sqlite.php +++ b/tests/databases/sqlite.php @@ -165,4 +165,9 @@ SQL; { $this->assertFalse($this->db->get_dbs()); } + + function TestGetSchemas() + { + $this->assertFalse($this->db->get_schemas()); + } } \ No newline at end of file diff --git a/tests/parent.php b/tests/parent.php index 8e15e11..908680d 100644 --- a/tests/parent.php +++ b/tests/parent.php @@ -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 \ No newline at end of file diff --git a/tests/test_dbs/FB_TEST_DB.FDB b/tests/test_dbs/FB_TEST_DB.FDB index 4f26ea572b2b3f22e286ec2d614a983e4a7eeb29..b22bfb019572abd10a4e1bde488369c95866f4e4 100755 GIT binary patch delta 1601 zcmai!KWI}y9LMjjX&Q4TJ&Fb^cs>(rii1r;tJH!PtQ|yxmC`{3GjtG9$D$}2L=F@O z|G^1eM9{&Z6k8e)Nl|ohP-mya8gQ{$>rn9C%lqnaG~|Vs%jdn9_qosVE0^=-a=u8( zXfEcF|A*k^u8{n7RTA>ioP;ns|DBNOBVV&S`&$nP!px@>05#vMa%o@bP469{1XY45 z(WOL0iEbsLO7tiZQ)1hSh(`qbBr8!be!b_(xR|Wm&c?@LDi>eL@yOy>4fd9U%+NTQ zO$-Dyok)=7q(>em)8uk8Lne}g#53!Lx&I(>;L+58{?+8W*s|2OYWx&ilKQj1E=rxM z^P!Wb!`~+}r&%`{$qz4>Yt`TyHP=Q6*e6OiHo^Ws%zgSw>V==&)359NAbTnG`kHzF z3#kvS@jd$Z58k(x5%#na00Yh@wE*S|+3LQ#vjsy$| z7?MG|Bx{%KZ(ovjBw$FuknFZg`ooe`hmswR1PlonlI^XMK7Z6!g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