예제 #1
0
파일: tests.php 프로젝트: bztsrc/phppe3
 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;
     }
 }
예제 #2
0
파일: mkrepo.php 프로젝트: bztsrc/phppe3
 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;
 }