OpenSQLManager/tests/index.php

36 lines
1.0 KiB
PHP

<?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
*/
define('OSL_TEST_DIR', dirname(__FILE__).'/');
define('OSL_BASE_DIR', str_replace(basename(OSL_TEST_DIR).'/', '', OSL_TEST_DIR).'sys/');
// --------------------------------------------------------------------------
// Include simpletest
// it has to be set in your php path, or put in the tests folder
require_once('simpletest/autorun.php');
require_once(OSL_BASE_DIR . 'db/autoload.php');
// Include core tests
array_map('do_include', glob(OSL_TEST_DIR . 'core/*.php'));
// Include required methods
array_map('do_include', glob(OSL_BASE_DIR . 'common/*.php'));
// Include db tests
require_once(OSL_BASE_DIR . 'db/tests/index.php');