本文整理汇总了PHP中testplan::get_linked_and_newest_tcversions方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::get_linked_and_newest_tcversions方法的具体用法?PHP testplan::get_linked_and_newest_tcversions怎么用?PHP testplan::get_linked_and_newest_tcversions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::get_linked_and_newest_tcversions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeGui
function initializeGui(&$dbHandler, &$argsObj, &$userObj, &$tprojectMgr)
{
$tcaseCfg = config_get('testcase_cfg');
$guiObj = new stdClass();
$guiObj->can_manage_testplans = $userObj->hasRight($dbHandler, "mgt_testplan_create", $argsObj->tproject_id, $argsObj->tplan_id);
$guiObj->show_details = 0;
$guiObj->user_feedback = '';
$guiObj->tcasePrefix = $tprojectMgr->getTestCasePrefix($argsObj->tproject_id) . $tcaseCfg->glue_character;
$guiObj->tproject_name = $argsObj->tproject_name;
$tplanMgr = new testplan($dbHandler);
$tplan_info = $tplanMgr->get_by_id($argsObj->tplan_id);
$guiObj->tplan_name = $tplan_info['name'];
$guiObj->tplan_id = $argsObj->tplan_id;
$guiObj->tproject_id = $argsObj->tproject_id;
$guiObj->testcases = $tplanMgr->get_linked_and_newest_tcversions($argsObj->tplan_id);
$linked_tcases = $tplanMgr->get_linked_items_id($argsObj->tplan_id);
$guiObj->doIt = count($linked_tcases) > 0;
$guiObj->tplans = array();
$tplans = $userObj->getAccessibleTestPlans($dbHandler, $argsObj->tproject_id);
foreach ($tplans as $key => $value) {
$guiObj->tplans[$value['id']] = $value['name'];
}
return $guiObj;
}
示例2: testcase
$tcase_mgr = new testcase($db);
$args = init_args();
$gui = new stdClass();
$gui->can_manage_testplans = $_SESSION['currentUser']->hasRight($db, "mgt_testplan_create");
$gui->tplans = array();
$gui->show_details = 0;
$gui->user_feedback = '';
$gui->tcasePrefix = $tcase_mgr->tproject_mgr->getTestCasePrefix($args->tproject_id) . $testcase_cfg->glue_character;
$tplan_info = $tcase_mgr->get_by_id($args->tplan_id);
$gui->tplan_name = $tplan_info['name'];
$gui->tplan_id = $args->tplan_id;
$gui->tproject_name = $args->tproject_name;
// $linked_tcases = $tplan_mgr->get_linked_tcversions($args->tplan_id);
$linked_tcases = $tplan_mgr->get_linked_items_id($args->tplan_id);
$qty_linked = count($linked_tcases);
$gui->testcases = $tplan_mgr->get_linked_and_newest_tcversions($args->tplan_id);
if ($qty_linked) {
$qty_newest = count($gui->testcases);
if ($qty_newest) {
$gui->show_details = 1;
// get path
$tcaseSet = array_keys($gui->testcases);
$path_info = $tree_mgr->get_full_path_verbose($tcaseSet);
foreach ($gui->testcases as $tcase_id => $value) {
$path = $path_info[$tcase_id];
unset($path[0]);
$path[] = '';
$gui->testcases[$tcase_id]['path'] = implode(' / ', $path);
}
} else {
$gui->user_feedback = lang_get('no_newest_version_of_linked_tcversions');