Tagged 0.7.5
[scuttle] / includes / utf8 / tests / config.php
1 <?php
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
6 }
7
8 if ( !defined('UTF8') ) {
9     define('UTF8',realpath(dirname(__FILE__).'/../'));
10 }
11
12 if ( !defined('UTF8DATA') ) {
13     define('UTF8DATA',dirname(__FILE__).'/data');
14 }
15
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';
21 } else {
22     trigger_error('Unable to load SimpleTest: configure SIMPLE_TEST in config.php');
23 }
24
25 function & getTestReporter() {
26     if ( php_sapi_name() != 'cli' ) {
27         $R = & new HtmlReporter('UTF-8');
28     } else {
29         require_once dirname(__FILE__) . '/cli_reporter.php';
30         $R = & new CLIReporter();
31     }
32     return $R;
33 }
34
35 if ( !isset($_GET['engine']) ) {
36     $_GET['engine'] = 'auto';
37 }
38
39 /**
40 * Testing against a particular "engine"
41 */
42 switch ( $_GET['engine'] ) {
43     case 'mbstring';
44         if ( !function_exists('mb_strtolower') ) {
45             trigger_error("mbstring extension not detected on your system!", E_USER_ERROR );
46         }
47         mb_internal_encoding('UTF-8');
48         require_once UTF8 . '/mbstring/core.php';
49     break;
50     case 'native':
51         require_once UTF8 . '/utils/unicode.php';
52         require_once UTF8 . '/native/core.php';
53     break;
54 }
55
56 require_once UTF8 . '/utf8.php';

Benjamin Mako Hill || Want to submit a patch?