setName('Shindig'); $path = dirname($_SERVER['SCRIPT_FILENAME']); $testTypes = array('common', 'gadgets', 'social'); foreach ($testTypes as $type) { if (isset($_GET['test'])) { $file_array = glob("$path/{$type}/{$_GET['test']}.php"); if (isset($file_array[0]) && is_readable($file_array[0])) { require_once $file_array[0]; $className = $_GET['test']; $suite->addTestSuite($className); } } else { foreach (glob("$path/{$type}/*Test.php") as $file) { if (is_readable($file)) { require_once $file; $className = str_replace('.php', '', basename($file)); $suite->addTestSuite($className); } } } } return $suite; } } ob_start(); echo "
";
AllTests::main();
echo "
"; $output = ob_get_clean(); // make sure the result page isn't cached, some of the tests set caching headers which is bad here header('Content-Type: text/html', true); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT", true); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT', true); header('Cache-Control: no-store, no-cache, must-revalidate', true); header('Cache-Control: pre-check=0, post-check=0, max-age=0', true); header("Pragma: no-cache", true); echo $output;