This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
OpenSQLManager/tests/index.php

61 lines
1.4 KiB
PHP
Raw Normal View History

<?php
/**
* OpenSQLManager
*
* Free Database manager for Open Source Databases
*
* @author Timothy J. Warren
* @copyright Copyright (c) 2012
* @link https://github.com/aviat4ion/OpenSQLManager
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
/**
* Unit test bootstrap - Using php simpletest
*/
2012-02-02 19:04:10 -05:00
define('BASE_DIR', '../src');
// Include simpletest
// it has to be set in your php path, or put in the tests folder
require_once('simpletest/autorun.php');
// Bulk loading wrapper workaround for PHP < 5.4
function do_include($path)
{
require_once($path);
}
// Include core tests
require_once("core.php");
2012-02-29 16:14:21 -05:00
require_once("../sys/common/db_pdo.php");
2012-03-01 12:05:32 -05:00
require_once("../sys/common/query_builder.php");
2012-02-02 19:04:10 -05:00
// Include db tests
// Load db classes based on capability
2012-02-29 16:14:21 -05:00
$src_path = "../sys/databases/";
$test_path = "./databases/";
foreach(pdo_drivers() as $d)
{
$src_file = "{$src_path}{$d}.php";
2012-02-06 22:04:03 -05:00
if(is_file($src_file))
{
require_once("{$src_path}{$d}.php");
require_once("{$src_path}{$d}_sql.php");
require_once("{$test_path}{$d}.php");
}
}
// Load Firebird if there is support
if(function_exists('ibase_connect') && ! in_array('firebird', pdo_drivers()))
{
require_once("{$src_path}firebird-base.php");
require_once("{$src_path}firebird_sql.php");
require_once("{$test_path}firebird.php");
}