| // +----------------------------------------------------------------------+ // // $Id: test.php,v 1.18 2006/10/20 16:36:32 lsmith Exp $ /* This is a small test suite for MDB2 using PHPUnit */ require_once 'test_setup.php'; require_once 'PHPUnit.php'; require_once 'testUtils.php'; require_once 'MDB2.php'; require_once 'HTML_TestListener.php'; function htmlErrorHandler($errno, $errstr, $errfile, $errline) { if ((!$GLOBALS['_show_silenced'] && !error_reporting()) || $errno == 2048) { return; } echo '
'; errorHandler($errno, $errstr, $errfile, $errline); echo ''; } set_error_handler('htmlErrorHandler'); function htmlErrorHandlerPEAR($error_obj) { echo '
'; errorHandlerPEAR($error_obj); echo ''; } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'htmlErrorHandlerPEAR'); MDB2::loadFile('Date'); foreach ($testcases as $testcase) { include_once $testcase.'.php'; } $database = 'driver_test'; $testmethods = !empty($_POST['testmethods']) ? $_POST['testmethods'] : null; if (!is_array($testmethods)) { foreach ($testcases as $testcase) { $testmethods[$testcase] = array_flip(getTests($testcase)); } } ?>