2 //--------------------------------------------------------------------
3 if (!defined('SIMPLE_TEST')) {
4 // Should point at SimpleTest (absolute path required with trailing slash)
5 define('SIMPLE_TEST', '/home/harryf/simpletest/'); // Use your include path
8 if ( !defined('UTF8') ) {
9 define('UTF8',realpath(dirname(__FILE__).'/../'));
12 if ( !defined('UTF8DATA') ) {
13 define('UTF8DATA',dirname(__FILE__).'/data');
16 //--------------------------------------------------------------------
17 // Load SimpleTest and main JPSpan
18 if ( @include_once SIMPLE_TEST . 'unit_tester.php' ) {
19 require_once SIMPLE_TEST . 'mock_objects.php';
20 require_once SIMPLE_TEST . 'reporter.php';
22 trigger_error('Unable to load SimpleTest: configure SIMPLE_TEST in config.php');
25 function & getTestReporter() {
26 if ( php_sapi_name() != 'cli' ) {
27 $R = & new HtmlReporter('UTF-8');
29 require_once dirname(__FILE__) . '/cli_reporter.php';
30 $R = & new CLIReporter();
35 if ( !isset($_GET['engine']) ) {
36 $_GET['engine'] = 'auto';
40 * Testing against a particular "engine"
42 switch ( $_GET['engine'] ) {
44 if ( !function_exists('mb_strtolower') ) {
45 trigger_error("mbstring extension not detected on your system!", E_USER_ERROR );
47 mb_internal_encoding('UTF-8');
48 require_once UTF8 . '/mbstring/core.php';
51 require_once UTF8 . '/utils/unicode.php';
52 require_once UTF8 . '/native/core.php';
56 require_once UTF8 . '/utf8.php';