Fix Firebird loading issue for tests
This commit is contained in:
parent
fabedc1d7f
commit
a443bbc86d
@ -85,7 +85,14 @@ require_once(QTEST_DIR . '/core/db_test.php');
|
||||
require_once(QTEST_DIR . '/core/db_qp_test.php');
|
||||
require_once(QTEST_DIR . '/core/db_qb_test.php');
|
||||
|
||||
// Load firebird classes for testing
|
||||
array_map('do_include', glob(QDRIVER_PATH.'/firebird/*.php'));
|
||||
// If Firebird (interbase) extension does not exist,
|
||||
// create a fake class to suppress errors from skipped tests
|
||||
if ( ! function_exists('fbird_connect'))
|
||||
{
|
||||
class Firebird {
|
||||
public $sql;
|
||||
public $util;
|
||||
}
|
||||
}
|
||||
|
||||
// End of bootstrap.php
|
@ -25,6 +25,11 @@ class FirebirdTest extends DBtest {
|
||||
{
|
||||
$dbpath = QTEST_DIR.QDS.'db_files'.QDS.'FB_TEST_DB.FDB';
|
||||
|
||||
if ( ! function_exists('fbird_connect'))
|
||||
{
|
||||
$this->markTestSkipped('Firebird extension does not exist');
|
||||
}
|
||||
|
||||
// test the db driver directly
|
||||
$this->db = new Firebird('localhost:'.$dbpath);
|
||||
$this->tables = $this->db->get_tables();
|
||||
|
Loading…
Reference in New Issue
Block a user