/** * This is main initiation file for unit tests. * It prepares environment, runs tests and lists available unit tests. * $Id$ */ // set alias for DIRECTORY_SEPARATOR defined("DS") or define('DS', DIRECTORY_SEPARATOR); // layout template for rendering output GUI defined("USE_TEMPLATE") or define('USE_TEMPLATE', 'template1.php'); // define some unique number for prepending into saved filenames from HTTP client (easier for orientation) defined('SEED') or define("SEED", time()); // load utilities from unit tests require_once dirname(__FILE__) . DS . 'TestUtils.php'; // start timestamp for unit tests defined('TIMESTART') or define("TIMESTART", TestUtils::utime()); // charset for converting via utility function TestUtils::convert() defined('CHARSET_WEB') or define('CHARSET_WEB', 'utf-8'); // charset in which selenium server returns responses defined('CHARSET_SERVER') or define('CHARSET_SERVER', 'utf-8'); /** * Main tests runner class for unit tests */ class TestGui { /** * Log filename */ const LOGNAME = 'unittest'; protected $errors = array(); protected static $directoryTests = '', $instance, $output_list_tests = '', $output_result_tests = '', $tests = array();