本文整理匯總了PHP中testproject::getOptionReqSpec方法的典型用法代碼示例。如果您正苦於以下問題:PHP testproject::getOptionReqSpec方法的具體用法?PHP testproject::getOptionReqSpec怎麽用?PHP testproject::getOptionReqSpec使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類testproject
的用法示例。
在下文中一共展示了testproject::getOptionReqSpec方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: templateConfiguration
require_once "../functions/common.php";
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$tproject_mgr = new testproject($db);
$req_mgr = new requirement_mgr($db);
$tcase_cfg = config_get('testcase_cfg');
$args = init_args();
$gui = new stdClass();
$gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($args->tprojectID);
$gui->tcasePrefix .= $tcase_cfg->glue_character;
$gui->mainCaption = lang_get('testproject') . " " . $args->tprojectName;
$enabled = 1;
$no_filters = null;
$gui->design_cf = $tproject_mgr->cfield_mgr->get_linked_cfields_at_design($args->tprojectID, $enabled, $no_filters, 'requirement');
$gui->keywords = $tproject_mgr->getKeywords($args->tprojectID);
$reqSpecSet = $tproject_mgr->getOptionReqSpec($args->tprojectID, testproject::GET_NOT_EMPTY_REQSPEC);
$gui->filter_by['design_scope_custom_fields'] = !is_null($gui->design_cf);
$gui->filter_by['keyword'] = !is_null($gui->keywords);
$gui->filter_by['requirement_doc_id'] = !is_null($reqSpecSet);
$reqCfg = config_get('req_cfg');
$gui->types = init_labels($reqCfg->type_labels);
$coverageManagement = $reqCfg->expected_coverage_management;
$gui->filter_by['expected_coverage'] = !is_null($coverageManagement);
$gui->reqStatus = init_labels($reqCfg->status_labels);
//BUGID 1748
$gui->filter_by['relation_type'] = $reqCfg->relations->enable;
$gui->req_relation_select = $req_mgr->init_relation_type_select();
foreach ($gui->req_relation_select['equal_relations'] as $key => $oldkey) {
// set new key in array and delete old one
$new_key = (int) str_replace("_source", "", $oldkey);
$gui->req_relation_select['items'][$new_key] = $gui->req_relation_select['items'][$oldkey];
示例2: processTestSuite
/**
*
*
*/
function processTestSuite(&$dbHandler, &$argsObj, &$guiObj)
{
$tproject_mgr = new testproject($dbHandler);
$guiObj->bulkassign_warning_msg = '';
$guiObj->tsuite_id = $argsObj->id;
$tsuite_info = $tproject_mgr->tree_manager->get_node_hierarchy_info($guiObj->tsuite_id);
$guiObj->pageTitle = lang_get('test_suite') . config_get('gui_title_separator_1') . $tsuite_info['name'];
$guiObj->req_specs = $tproject_mgr->getOptionReqSpec($argsObj->tproject_id, testproject::GET_NOT_EMPTY_REQSPEC);
$guiObj->selectedReqSpec = $argsObj->idReqSpec;
$guiObj->tcase_number = 0;
$guiObj->has_req_spec = false;
$guiObj->tsuite_id = $argsObj->id;
if (!is_null($guiObj->req_specs) && count($guiObj->req_specs)) {
$guiObj->has_req_spec = true;
if (is_null($argsObj->idReqSpec)) {
$guiObj->selectedReqSpec = key($guiObj->req_specs);
}
$req_spec_mgr = new requirement_spec_mgr($dbHandler);
$guiObj->requirements = $req_spec_mgr->get_requirements($guiObj->selectedReqSpec);
$tsuite_mgr = new testsuite($dbHandler);
$tcase_set = $tsuite_mgr->get_testcases_deep($argsObj->id, 'only_id');
$guiObj->tcase_number = count($tcase_set);
if ($guiObj->tcase_number > 0) {
$guiObj->bulkassign_warning_msg = sprintf(lang_get('bulk_req_assign_msg'), $guiObj->tcase_number);
} else {
$guiObj->bulkassign_warning_msg = lang_get('bulk_req_assign_no_test_cases');
}
}
return $guiObj;
}