/** * Exit handler to run all recent test cases and exit system if in CLI */ function simpletest_autorun() { if (tests_have_run()) { return; } $result = run_local_tests(); if (SimpleReporter::inCli()) { exit($result ? 0 : 1); } }
/** * Exit handler to run all recent test cases and exit system if in CLI */ function simpletest_autorun() { chdir($GLOBALS['SIMPLETEST_AUTORUNNER_INITIAL_PATH']); if (tests_have_run()) { return; } $result = run_local_tests(); if (SimpleReporter::inCli()) { exit($result ? 0 : 1); } }
function stop_coverage() { # hack until i can think of a way to run tests first and w/o exiting $autorun = function_exists("run_local_tests"); if ($autorun) { $result = run_local_tests(); } CodeCoverage::getInstance()->stopCoverage(); if ($autorun) { exit($result ? 0 : 1); } }
/** * Stops the current coverage analysis. */ function stop_coverage() { // hack until i can think of a way to run tests first and w/o exiting. $autorun = function_exists('run_local_tests'); if ($autorun) { $result = run_local_tests(); } Driver::getInstance()->stop(); if ($autorun) { exit($result ? 0 : 1); } }