function run($item) { Http::mime("text/plain", false); $ret = Testing::doTests($this->testCases, $item); if ($ret === null) { die(sprintf(L("Test %s not found"), $item) . "\n"); } else { die; } }
function __construct() { //! check if executed from CLI if (Core::$client->ip != "CLI") { Http::redirect("403"); } //! run tests if (in_array("--tests", $_SERVER['argv'])) { echo "Running tests: "; ob_start(); $tests = Testing::doTests(); $d = ob_get_clean(); if (!$tests) { die("FAILED\n{$d}"); } echo "OK\n"; unset($d); } //! *** MKREPO Event *** Core::event("mkrepo"); //! create repository Repository::make(); die; }