Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > dca483b59ba61f3fa092de932ddd570e > files > 964

nuface-2.0.14-2mdv2009.1.i586.rpm

<?php

/* Define NUFACE_DIR constant */
$path = dirname(dirname(__FILE__));
define('NUFACE_DIR', $path.'/');

$GLOBALS['nuface_unittests'] = true;

/* Load SimpleTest library */
define('SIMPLE_TEST', NUFACE_DIR . 'simpletest/');
require_once(SIMPLE_TEST . 'unit_tester.php');
require_once(SIMPLE_TEST . 'reporter.php');

/* Add NUFACE_DIR to include_path if needed */
if ($path != getcwd()) {
    ini_set('include_path', ini_get('include_path').':'.NUFACE_DIR);
}

/* Setup language */
require_once(NUFACE_DIR . 'include/load_config.php');
$default_language = 'en';
$debug_nuface = true;
$debug_nuface_verbose = false;
require_once(NUFACE_DIR . 'include/common.php');

/* Run a test, $class is a class name which inherits from UnitTestCase */
function runTest($test)
{
    $use_command_line = count($_SERVER['argv']) != 0;
    if ($use_command_line)
        $reporter = new TextReporter();
    else {
        $reporter = new HtmlReporter();
    }
    $ok = $test->run($reporter);
    if ($use_command_line)
    {
        if (!$ok)
            exit(1);
        else
            exit(0);
    }
}

?>