Ejemplo n.º 1
0
 /**
  * Run several tests
  * @param string|array $pType
  * @param bool $pIsFirstStart
  * @return array|bool
  */
 public static function runTestPackage($pType = "", $pIsFirstStart = false)
 {
     try {
         $tests = CSecurityTestsPackage::getTestsPackage($pType);
         $dispatcher = new CSecuritySiteChecker($tests, $pIsFirstStart);
         $result = $dispatcher->startTesting();
         $result["percent"] = $dispatcher->getPercent();
         if ($dispatcher->isAllTestCompleted()) {
             $result["all_done"] = "Y";
             self::clearCache();
         } else {
             $result["all_done"] = "N";
         }
     } catch (Exception $e) {
         $result = array("all_done" => "Y");
     }
     return $result;
 }