Exemplo n.º 1
0
 /**
  * Check resource paths
  */
 public function checkTask()
 {
     include_once dirname(dirname(__DIR__)) . '/helpers/tests/links.php';
     //include_once(dirname(dirname(__DIR__)) . '/helpers/tests/abstracts.php');
     $auditor = new \Hubzero\Content\Auditor('resource');
     $auditor->registerTest(new \Components\Resources\Helpers\Tests\Links());
     //$auditor->registerTest(new \Components\Resources\Helpers\Tests\Abstracts);
     $test = Request::getVar('test');
     $status = Request::getVar('status', 'failed');
     if (!in_array($status, array('skipped', 'passed', 'failed'))) {
         $status = 'failed';
     }
     $audits = $auditor->getTests();
     if (count($audits) == 1) {
         foreach ($audits as $key => $tester) {
             $test = $key;
         }
         $status = $status ? $status : 'failed';
     }
     $this->view->set('test', $test)->set('status', $status)->set('tests', $auditor->getReport())->setLayout('check')->display();
 }