$UNITTEST = new object(); // Print the header. $strtitle = get_string('unittests', $langfile); if (!is_null($path)) { // Turn off xmlstrictheaders during the unit test run. $origxmlstrictheaders = !empty($CFG->xmlstrictheaders); $CFG->xmlstrictheaders = false; admin_externalpage_print_header(); $CFG->xmlstrictheaders = $origxmlstrictheaders; unset($origxmlstrictheaders); // Create the group of tests. $test = new AutoGroupTest($showsearch); // OU specific. We use the _nonproject folder for stuff we want to // keep in CVS, but which is not really relevant. It does no harm // to leave this here. $test->addIgnoreFolder($CFG->dirroot . '/_nonproject'); // Make the reporter, which is what displays the results. $reporter = new ExHtmlReporter($showpasses); if ($showsearch) { print_heading('Searching for test cases'); } flush(); // Work out what to test. if (substr($path, 0, 1) == '/') { $path = substr($path, 1); } $path = $CFG->dirroot . '/' . $path; if (substr($path, -1) == '/') { $path = substr($path, 0, -1); } $displaypath = substr($path, strlen($CFG->dirroot) + 1);