From 2465941fdf1f7649d30d98138b03ab60c35c75d2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Mon, 17 Feb 2014 19:12:53 -0500 Subject: [PATCH] Skip Postgres tests if the class isn't loaded --- tests/databases/pgsql/PgSQLTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/databases/pgsql/PgSQLTest.php b/tests/databases/pgsql/PgSQLTest.php index e248543..e9572e5 100644 --- a/tests/databases/pgsql/PgSQLTest.php +++ b/tests/databases/pgsql/PgSQLTest.php @@ -22,6 +22,13 @@ class PgTest extends DBTest { public function setUp() { + + // If the database isn't installed, skip the tests + if ( ! class_exists("PgSQL")) + { + $this->markTestSkipped(); + } + // Attempt to connect, if there is a test config file if (is_file(QBASE_DIR . "test_config.json")) {