本文整理汇总了PHP中tree::get_full_path_verbose方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::get_full_path_verbose方法的具体用法?PHP tree::get_full_path_verbose怎么用?PHP tree::get_full_path_verbose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree
的用法示例。
在下文中一共展示了tree::get_full_path_verbose方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getReqCoverage
/**
* getReqCoverage
*
*/
function getReqCoverage(&$dbHandler, $reqs, &$execMap)
{
$tree_mgr = new tree($dbHandler);
$coverageAlgorithm = config_get('req_cfg')->coverageStatusAlgorithm;
$resultsCfg = config_get('results');
$status2check = array_keys($resultsCfg['status_label_for_exec_ui']);
// $coverage['byStatus']=null;
$coverage['withTestCase'] = null;
$coverage['withoutTestCase'] = null;
$coverage['byStatus'] = $resultsCfg['status_label_for_exec_ui'];
$status_counters = array();
foreach ($coverage['byStatus'] as $status_code => $value) {
$coverage['byStatus'][$status_code] = array();
$status_counters[$resultsCfg['status_code'][$status_code]] = 0;
}
$reqs_qty = count($reqs);
if ($reqs_qty > 0) {
foreach ($reqs as $requirement_id => $req_tcase_set) {
$first_key = key($req_tcase_set);
$item_qty = count($req_tcase_set);
$req = array("id" => $requirement_id, "title" => $req_tcase_set[$first_key]['req_title'], "req_doc_id" => $req_tcase_set[$first_key]["req_doc_id"]);
foreach ($status_counters as $key => $value) {
$status_counters[$key] = 0;
}
if ($req_tcase_set[$first_key]['testcase_id'] > 0) {
$coverage['withTestCase'][$requirement_id] = 1;
} else {
$coverage['withoutTestCase'][$requirement_id] = $req;
}
for ($idx = 0; $idx < $item_qty; $idx++) {
$item_info = $req_tcase_set[$idx];
if ($idx == 0) {
$req['title'] = $item_info['req_title'];
}
// BUGID 1063
if ($item_info['testcase_id'] > 0) {
$exec_status = $resultsCfg['status_code']['not_run'];
$tcase_path = '';
if (isset($execMap[$item_info['testcase_id']]) && sizeof($execMap[$item_info['testcase_id']])) {
$execInfo = end($execMap[$item_info['testcase_id']]);
$tcase_path = $execInfo['tcase_path'];
if (isset($execInfo['status']) && trim($execInfo['status']) != '') {
$exec_status = $execInfo['status'];
}
} else {
$path_info = $tree_mgr->get_full_path_verbose($item_info['testcase_id']);
unset($path_info[$item_info['testcase_id']][0]);
// remove test project name
$path_info[$item_info['testcase_id']][] = '';
$tcase_path = implode(' / ', $path_info[$item_info['testcase_id']]);
}
$status_counters[$exec_status]++;
$req['tcList'][] = array("tcID" => $item_info['testcase_id'], "title" => $item_info['testcase_name'], "tcaseExternalID" => $item_info['testcase_external_id'], "version" => $item_info['testcase_version'], "tcase_path" => $tcase_path, "status" => $exec_status, "status_label" => $resultsCfg['status_label'][$resultsCfg['code_status'][$exec_status]]);
}
}
// for($idx = 0; $idx < $item_qty; $idx++)
// We analyse counters
$go_away = 0;
foreach ($coverageAlgorithm['checkOrder'] as $checkKey) {
foreach ($coverageAlgorithm['checkType'][$checkKey] as $tcase_status) {
if ($checkKey == 'atLeastOne') {
if ($status_counters[$resultsCfg['status_code'][$tcase_status]] > 0) {
$coverage['byStatus'][$tcase_status][] = $req;
$go_away = 1;
break;
}
}
if ($checkKey == 'all') {
if ($status_counters[$resultsCfg['status_code'][$tcase_status]] == $item_qty) {
$coverage['byStatus'][$tcase_status][] = $req;
$go_away = 1;
break;
} elseif ($status_counters[$resultsCfg['status_code'][$tcase_status]] > 0) {
$coverage['byStatus'][$tcase_status][] = $req;
$go_away = 1;
break;
} elseif (isset($coverageAlgorithm['checkFail']) && isset($coverageAlgorithm['checkFail'][$checkKey]) && isset($req['tcList'])) {
// BUGID 2171
// ($coverageAlgorithm['checkFail'][$checkKey]==$tcase_status)
// If particular requirement has assigned more than one test cases, and:
// - at least one of assigned test cases was not yet executed
// - the rest of assigned test cases was executed and passed
// then on the "Requirements based report" this particular requirement
// is not shown at all (in any section).
$coverage['byStatus'][$coverageAlgorithm['checkFail'][$checkKey]][] = $req;
$go_away = 1;
break;
}
}
}
if ($go_away) {
break;
}
}
}
// foreach($reqs as $requirement_id => $req_tcase_set)
//.........这里部分代码省略.........
示例2: tlTestPlanMetrics
$metricsMgr = new tlTestPlanMetrics($db);
$metrics = $metricsMgr->getNotRunWoTesterAssigned($args->tplan_id, null, null, array('output' => 'array', 'ignoreBuild' => true));
if (($gui->row_qty = count($metrics)) > 0) {
$msg_key = '';
$links = featureLinks($gui->labels, $smarty->getImages());
$gui->pageTitle .= " - " . $gui->labels['match_count'] . ":" . $gui->row_qty;
if ($args->show_platforms) {
$platformCache = $tplan_mgr->getPlatforms($args->tplan_id, array('outputFormat' => 'mapAccessByID'));
}
// Collect all tcases id and get all test suite paths
$targetSet = array();
foreach ($metrics as &$item) {
$targetSet[] = $item['tcase_id'];
}
$tree_mgr = new tree($db);
$path_info = $tree_mgr->get_full_path_verbose($targetSet);
unset($tree_mgr);
unset($targetSet);
$data = array();
foreach ($metrics as &$item) {
$row = array();
$row[] = join(" / ", $path_info[$item['tcase_id']]);
$row[] = "<!-- " . sprintf("%010d", $item['external_id']) . " -->" . sprintf($links['full'], $item['tcase_id'], $item['tcase_id']) . $item['full_external_id'] . ': ' . $item['name'];
if ($args->show_platforms) {
$row[] = $platformCache[$item['platform_id']]['name'];
}
if ($gui->options->testPriorityEnabled) {
// THIS HAS TO BE REFACTORED, because we can no do lot of calls
// because performance will be BAD
$row[] = $tplan_mgr->urgencyImportanceToPriorityLevel($item['urg_imp']);
}
示例3: array
$filters = array('assigned_to' => TL_USER_NOBODY, 'exec_status' => $cfg['status_code']['not_run']);
$options = array('output' => 'array', 'details' => 'summary');
$testCaseSet = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
if (($gui->row_qty = count($testCaseSet)) > 0) {
$msg_key = '';
$gui->pageTitle .= " - " . lang_get('match_count') . ":" . $gui->row_qty;
$tproject_mgr = new testproject($db);
$prefix = $tproject_mgr->getTestCasePrefix($args->tproject_id);
unset($tproject_mgr);
// Collect all tc_id:s and get all test suite paths
$tcase_set = array();
foreach ($testCaseSet as $item) {
$tcase_set[] = $item['tc_id'];
}
$tree_mgr = new tree($db);
$path_info = $tree_mgr->get_full_path_verbose($tcase_set);
unset($tree_mgr);
$data = array();
foreach ($testCaseSet as $item) {
$verbosePath = join(" / ", $path_info[$item['tc_id']]);
$name = buildExternalIdString($prefix, $item['external_id'] . ': ' . $item['name']);
// create linked icons
$exec_history_link = "<a href=\"javascript:openExecHistoryWindow({$item['tc_id']});\">" . "<img title=\"{$labels['execution_history']}\" src=\"{$history_img}\" /></a> ";
$edit_link = "<a href=\"javascript:openTCEditWindow({$gui->tproject_id},{$item['tc_id']});\">" . "<img title=\"{$labels['design']}\" src=\"{$edit_img}\" /></a> ";
$link = "<!-- " . sprintf("%010d", $item['external_id']) . " -->" . $exec_history_link . $edit_link . $name;
$row = array($verbosePath, $link);
if ($args->show_platforms) {
$row[] = $item['platform_name'];
}
if ($_SESSION['testprojectOptions']->testPriorityEnabled) {
$row[] = $tplan_mgr->urgencyImportanceToPriorityLevel($item['priority']);
示例4: dBug
* @author Francisco Mancardi
*
*
*
* rev :
*/
require_once '../../../config.inc.php';
require_once 'common.php';
require_once 'tree.class.php';
testlinkInitPage($db);
echo "<pre> tree - constructor - tree(&\$db)";
echo "</pre>";
$tree_mgr = new tree($db);
new dBug($tree_mgr);
$args = array(3312, 3314, 3316);
$dummy = $tree_mgr->get_full_path_verbose($args, array('error_behaivour' => 'soft'));
new dBug($dummy);
$args = array(3312, 3314, 33333316);
$dummy = $tree_mgr->get_full_path_verbose($args, array('error_behaivour' => 'soft'));
new dBug($dummy);
$args = array(3312, 3314, 33333316);
$dummy = $tree_mgr->get_full_path_verbose($args);
new dBug($dummy);
die;
echo "<pre> tree - get_available_node_types()";
echo "</pre>";
$available_node_types = $tree_mgr->get_available_node_types();
new dBug($available_node_types);
echo "<pre> tree - get_node_hierarchy_info(\$node_id)";
echo "</pre>";
$node_id = 1;