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


PHP testcase::get_linked_versions方法代码示例

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


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

示例1: dBug

$method = 'get_by_name';
echo "<pre>            {$method}('{$tcase_name}','{$tsuite_name}','{$tproject_name}')";
echo "</pre>";
$info = $tcase_mgr->{$method}($tcase_name, $tsuite_name, $tproject_name);
new dBug($info);
die;
$tcase_id = 4;
echo "<pre> testcase - check_link_and_exec_status(\$id)";
echo "</pre>";
echo "<pre>            check_link_and_exec_status({$tcase_id})";
echo "</pre>";
$link_and_exec_status = $tcase_mgr->check_link_and_exec_status($tcase_id);
new dBug($link_and_exec_status);
echo "<pre> testcase - get_linked_versions(\$id,\$exec_status='ALL',\$active_status='ALL')";
echo "<pre>            get_linked_versions({$tcase_id})";
$linked_versions = $tcase_mgr->get_linked_versions($tcase_id);
new dBug($linked_versions);
$tcase_id = 4;
echo "<pre> testcase - get_testproject(\$id)";
echo "<pre>            get_testproject({$tcase_id})";
$testproject_id = $tcase_mgr->get_testproject($tcase_id);
new dBug("testproject id=" . $testproject_id);
$tcase_id = 4;
echo "<pre> testcase - get_last_version_info(\$id)";
echo "<pre>            get_last_version_info({$tcase_id})";
$last_version_info = $tcase_mgr->get_last_version_info($tcase_id);
new dBug($last_version_info);
echo "<pre> testcase - get_versions_status_quo(\$id,\$tcversion_id=null, \$testplan_id=null)";
echo "<pre>            get_versions_status_quo({$tcase_id})";
$status_quo = $tcase_mgr->get_versions_status_quo($tcase_id);
new dBug($status_quo);
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:testcase.class.test.php

示例2: foreach

$tcase_all_info = $tcase_mgr->get_by_id($args->tcase_id, testcase::ALL_VERSIONS, null, $options);
if (!is_null($tcase_all_info)) {
    foreach ($tcase_all_info as $tcversion_info) {
        if ($tcversion_info['id'] == $args->tcversion_id) {
            $version = $tcversion_info['version'];
            $gui->pageTitle = lang_get('test_case') . ':' . $tcversion_info['name'];
            $gui->tcaseIdentity = $tproject_mgr->getTestCasePrefix($args->tproject_id);
            $gui->tcaseIdentity .= $glue . $tcversion_info['tc_external_id'] . ':' . $tcversion_info['name'];
            break;
        }
    }
}
// 20100514 - franciscom
// Why I'm filter on NOT_EXECUTED ??? -> this causes BUGID 3189
// $link_info = $tcase_mgr->get_linked_versions($args->tcase_id,'NOT_EXECUTED');
$link_info = $tcase_mgr->get_linked_versions($args->tcase_id);
// 20100124 - work only on ACTIVE TEST PLANS => array('plan_status' => 1)
if (!is_null($tplanSet = $tproject_mgr->get_all_testplans($args->tproject_id, array('plan_status' => 1)))) {
    $has_links = array_fill_keys(array_keys($tplanSet), false);
    $linked_tplans = null;
    if (!is_null($link_info)) {
        foreach ($link_info as $tcversion_id => $info) {
            foreach ($info as $tplan_id => $platform_info) {
                $has_links[$tplan_id] = true;
                foreach ($platform_info as $platform_id => $value) {
                    // $gui->tplans[$tplan_id][$platform_id]['tcversion_id']=$value['id'];
                    $linked_tplans[$tplan_id][$platform_id]['tcversion_id'] = $value['tcversion_id'];
                    $linked_tplans[$tplan_id][$platform_id]['version'] = $value['version'];
                    $linked_tplans[$tplan_id][$platform_id]['draw_checkbox'] = false;
                }
            }
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:tcAssign2Tplan.php

示例3: importTestPlanLinksFromXML


//.........这里部分代码省略.........
                        }
                    }
                } else {
                    if ($linkWithPlatform) {
                        $import_status = $labels['not_imported'];
                        $dummy_msg = sprintf($labels['link_with_platform_not_needed'], $idx + 1);
                    } else {
                        $platformID = 0;
                        $status_ok = true;
                    }
                }
                if (!is_null($dummy_msg)) {
                    $msg[] = array($dummy_msg, $import_status);
                }
                // echo '$status_ok' . $status_ok . ' ' . __LINE__ . '<br>' ;
                if ($status_ok) {
                    $createLink = false;
                    $updateLink = false;
                    // Link passed ok check on platform
                    // Now we need to understand if requested Test case is present on Test Project
                    $externalID = (int) $xmlLinks[$idx]->testcase->externalid;
                    $tcaseName = (string) $xmlLinks[$idx]->testcase->name;
                    $execOrder = (int) $xmlLinks[$idx]->testcase->execution_order;
                    $version = (int) $xmlLinks[$idx]->testcase->version;
                    if (isset($tcaseSet[$externalID])) {
                        // now need to check if requested version exists
                        $dummy = $tcaseMgr->get_basic_info($tcaseSet[$externalID], array('number' => $version));
                        if (count($dummy) > 0) {
                            // Check :
                            // for same test plan there is a different version already linked ?
                            // if YES => error.
                            //
                            $lvFilters = array('tplan_id' => $contextObj->tplan_id);
                            $linkedVersions = $tcaseMgr->get_linked_versions($dummy[0]['id'], $lvFilters);
                            $updateLink = false;
                            $doUpdateFeedBack = true;
                            // TICKET 5189: Import a test plan does not import test cases execution order
                            // new dBug($linkedVersions);
                            if (!($createLink = is_null($linkedVersions))) {
                                // Now need to understand if is already linked with this signature.
                                if (!isset($linkedVersions[$dummy[0]['tcversion_id']])) {
                                    //echo 'CREATE';
                                    $createLink = true;
                                } else {
                                    // linked platforms
                                    $createLink = false;
                                    $updateLink = false;
                                    $plat_keys = array_keys($linkedVersions[$dummy[0]['tcversion_id']][$contextObj->tplan_id]);
                                    $plat_keys = array_flip($plat_keys);
                                    if (isset($plat_keys[$platformID])) {
                                        $updateLink = true;
                                    } else {
                                        if ($platformID == 0) {
                                            // User request to add without platform, but platforms exist => SKIP
                                            $msg[] = array('platform 0 missing messages', $labels['not_imported']);
                                        } else {
                                            $createLink = true;
                                        }
                                    }
                                }
                            }
                            if ($createLink) {
                                // Create link
                                // function link_tcversions($id,&$items_to_link,$userId)
                                $item2link['items'] = array($dummy[0]['id'] => array($platformID => $dummy[0]['tcversion_id']));
                                $item2link['tcversion'] = array($dummy[0]['id'] => $dummy[0]['tcversion_id']);
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:67,代码来源:planImport.php


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