From e3fefa1aca7f79ef5f08edb0a3cb68c2dce15db0 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 5 Mar 2012 16:14:35 -0500 Subject: [PATCH] Fixed part of firebird tests with native driver --- index.php | 2 +- sys/databases/firebird.php | 5 ++++- tests/index.php | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index f3bb420..7e04602 100644 --- a/index.php +++ b/index.php @@ -100,7 +100,7 @@ foreach(pdo_drivers() as $d) } // Load Firebird if there is support -if(function_exists('ibase_connect')) +if(function_exists('ibase_connect') && ! in_array('firebird', pdo_drivers())) { require_once("{$path}firebird-ibase.php"); require_once("{$path}firebird_sql.php"); diff --git a/sys/databases/firebird.php b/sys/databases/firebird.php index 8a7d110..1461b91 100644 --- a/sys/databases/firebird.php +++ b/sys/databases/firebird.php @@ -19,9 +19,12 @@ class Firebird extends DB_PDO { /** * Constructor */ - public function __construct($dbpath, $user, $pass) + public function __construct($dbpath, $user='sysdba', $pass='masterkey') { parent::__construct("firebird:{$dbpath}", $user, $pass); + + $class = __CLASS__."_sql"; + $this->sql = new $class; } // -------------------------------------------------------------------------- diff --git a/tests/index.php b/tests/index.php index b37570d..99dc92a 100644 --- a/tests/index.php +++ b/tests/index.php @@ -15,7 +15,6 @@ /** * Unit test bootstrap - Using php simpletest */ - define('BASE_DIR', '../src'); // Include simpletest