当前位置: 首页>>代码示例>>PHP>>正文


PHP testproject::get_linked_custom_fields方法代码示例

本文整理汇总了PHP中testproject::get_linked_custom_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP testproject::get_linked_custom_fields方法的具体用法?PHP testproject::get_linked_custom_fields怎么用?PHP testproject::get_linked_custom_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在testproject的用法示例。


在下文中一共展示了testproject::get_linked_custom_fields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dBug

$tproject_id = 1;
echo "<pre>               get_keywords_map({$tproject_id})";
echo "</pre>";
$keywords_map = $tproject_mgr->get_keywords_map($tproject_id);
new dBug($keywords_map);
echo "<pre> testproject - get_keywords_tcases(\$testproject_id, \$keyword_id=0)";
echo "</pre>";
echo "<pre>               get_keywords_tcases({$tproject_id})";
echo "</pre>";
$keywords_tcases = $tproject_mgr->get_keywords_tcases($tproject_id);
new dBug($keywords_tcases);
echo "<pre> testproject - get_linked_custom_fields(\$id,\$node_type=null)";
echo "</pre>";
echo "<pre>               get_linked_custom_fields({$tproject_id})";
echo "</pre>";
$linked_custom_fields = $tproject_mgr->get_linked_custom_fields($tproject_id);
new dBug($linked_custom_fields);
echo "<pre> testproject - gen_combo_test_suites(\$id,\$exclude_branches=null,\$mode='dotted')";
echo "</pre>";
echo "<pre>               gen_combo_test_suites({$tproject_id},null,'dotted')";
echo "</pre>";
$combo_test_suites = $tproject_mgr->gen_combo_test_suites($tproject_id, null, 'dotted');
new dBug($combo_test_suites);
echo "<pre>               gen_combo_test_suites({$tproject_id},null,'dotted')";
echo "</pre>";
$combo_test_suites = $tproject_mgr->gen_combo_test_suites($tproject_id, null, 'array');
new dBug($combo_test_suites);
echo "<pre> testproject - getReqSpec(\$testproject_id, \$id = null)";
echo "</pre>";
echo "<pre>               getReqSpec({$tproject_id})";
echo "</pre>";
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:testproject.class.test.php

示例2: saveImportedResultData

function saveImportedResultData(&$db, $resultData, $context)
{
    if (!$resultData) {
        return;
    }
    $debugMsg = ' FUNCTION: ' . __FUNCTION__;
    $tables = tlObjectWithDB::getDBTables(array('executions', 'execution_bugs'));
    $l18n = array('import_results_tc_not_found' => '', 'import_results_invalid_result' => '', 'tproject_id_not_found' => '', 'import_results_ok' => '', 'internal_id' => '', 'external_id' => '');
    foreach ($l18n as $key => $value) {
        $l18n[$key] = lang_get($key);
    }
    // Get Column definitions to get size dinamically instead of create constants
    $columnDef = array();
    $adodbObj = $db->get_dbmgr_object();
    $columnDef['execution_bugs'] = $adodbObj->MetaColumns($tables['execution_bugs']);
    $keySet = array_keys($columnDef['execution_bugs']);
    foreach ($keySet as $keyName) {
        if (($keylow = strtolower($keyName)) != $keyName) {
            $columnDef['execution_bugs'][$keylow] = $columnDef['execution_bugs'][$keyName];
            unset($columnDef['execution_bugs'][$keyName]);
        }
    }
    $user = new tlUser($context->userID);
    $user->readFromDB($db);
    $tcase_mgr = new testcase($db);
    $resulstCfg = config_get('results');
    $tcaseCfg = config_get('testcase_cfg');
    $resultMap = array();
    $tplan_mgr = null;
    $tc_qty = sizeof($resultData);
    $cfields = null;
    if ($tc_qty) {
        $tplan_mgr = new testplan($db);
        $tproject_mgr = new testproject($db);
        // BUGID 3843
        $cfields = $tproject_mgr->get_linked_custom_fields($context->tprojectID, 'testcase', 'name');
    }
    // Need to do checks on common settings
    //
    // test project exists
    //
    // test plan id:
    //              belongs to target test project
    //              is active
    // build id:
    //          belongs to target test plan
    //          is open
    //
    // platform id:
    //          is linked  to target test plan
    //
    // execution type if not present -> set to MANUAL
    //				  if presente is valid i.e. inside the TL domain
    //
    $checks['status_ok'] = true;
    $checks['msg'] = null;
    $dummy = $tproject_mgr->get_by_id($context->tprojectID);
    $checks['status_ok'] = !is_null($dummy);
    if (!$checks['status_ok']) {
        $checks['msg'][] = sprintf($l18n['tproject_id_not_found'], $context->tprojectID);
    }
    if (!$checks['status_ok']) {
        foreach ($checks['msg'] as $warning) {
            $resultMap[] = array($warning);
        }
    }
    $doIt = $checks['status_ok'];
    // --------------------------------------------------------------------
    for ($idx = 0; $doIt && $idx < $tc_qty; $idx++) {
        $tester_id = 0;
        $tester_name = '';
        $using_external_id = false;
        $message = null;
        $status_ok = true;
        $tcase_exec = $resultData[$idx];
        // BUGID 3751: New attribute "execution type" makes old XML import files incompatible
        // Important NOTICE:
        // tcase_exec is passed BY REFERENCE to allow check_exec_values()change execution type if needed
        //
        $checks = check_exec_values($db, $context->tprojectID, $cfields, $tcase_mgr, $user_mgr, $tcaseCfg, $tcase_exec, $columnDef['execution_bugs']);
        $status_ok = $checks['status_ok'];
        if ($status_ok) {
            $tcase_id = $checks['tcase_id'];
            $tcase_external_id = trim($tcase_exec['tcase_external_id']);
            $tester_id = $checks['tester_id'];
            // external_id has precedence over internal id
            $using_external_id = $tcase_external_id != "";
        } else {
            foreach ($checks['msg'] as $warning) {
                $resultMap[] = array($warning);
            }
        }
        if ($status_ok) {
            $tcase_identity = $using_external_id ? $tcase_external_id : $tcase_id;
            $verbose_identity = $using_external_id ? $l18n['external_id'] : $l18n['internal_id'];
            $verbose_identity = sprintf($verbose_identity, $tcase_identity);
            $result_code = strtolower($tcase_exec['result']);
            $result_is_acceptable = isset($resulstCfg['code_status'][$result_code]) ? true : false;
            $notes = $tcase_exec['notes'];
            $message = null;
//.........这里部分代码省略.........
开发者ID:moraesmv,项目名称:testlink-code,代码行数:101,代码来源:resultsImport.php


注:本文中的testproject::get_linked_custom_fields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。