コード例 #1
0
ファイル: lib-commonTest.php プロジェクト: mystralkk/geeklog
 protected function tearDown()
 {
     parent::tearDown();
     Tst::removeSiteConfigFile();
 }
コード例 #2
0
 public static function setUpBeforeClass()
 {
     Tst::loadLibrary('mbyte');
     MBYTE_checkEnabled('test-reset');
 }
コード例 #3
0
}
?>
          </fieldset>
        </form>
      </div>
      <div id="clear"></div>
    </div>
    <?php 
if (Tst::access(array(3))) {
    ?>
    <div id="tabs-2"></div>
    <?php 
}
?>
    <?php 
if (Tst::access(array(2, 3))) {
    ?>
    <div id="tabs-3"></div>
    <?php 
}
?>
  </div>
</div>
<script type="text/javascript"> 
$(function() {
    $("#tabs").tabs();
});

var $tabs = $('#tabs').tabs();
var path = "jobs/";
コード例 #4
0
<?php

require_once '../tst.class.php';
if (Tst::access(array(1, 3))) {
    require_once Tst::$tests . 'files/classes/tests.class.php';
    $tests = new Tests();
    $table = '';
    foreach ($_POST['logs'] as $log) {
        $table .= json_encode($tests->createTable($tests->getJSONResults(1, 1, $log)));
    }
    echo $table;
} else {
    echo 'This is not enabled';
}
コード例 #5
0
<?php

// Script to run all tests, intended for cronjob
require_once 'tst.class.php';
Tst::access(array(2), 1);
require_once Tst::$tests . 'files/classes/tests.class.php';
$tests = new Tests();
$suite = array(Tst::$tests . '/suite');
// Run suite and store logs, but don't return anything
$output = json_encode($tests->runTests($suite, 1, 0, 0));
echo $output;
コード例 #6
0
<?php

require_once '../tst.class.php';
Tst::access(array(2, 3), 1);
require_once Tst::$tests . 'files/classes/tests.class.php';
$tests = new Tests();
$loglist = $tests->deleteLogs($_POST['logs']);
コード例 #7
0
 public function readMasterLog($offset = 1, $howMany = 1)
 {
     $ret = array();
     if (Tst::access(array(1))) {
         $path = Tst::$tests . 'logs/';
         $arr = file($path . 'masterlog.txt', FILE_IGNORE_NEW_LINES);
         $arrSize = count($arr);
         $i = 0;
         while ($i < $howMany && $i < $arrSize) {
             $test = array_slice($arr, $offset - $i);
             $testid = substr($test[0], 0, 10);
             $ret[] = array('testid' => $testid, 'testtime' => date("F j, Y, g:i a", $testid));
             $i++;
         }
     }
     return $ret;
 }