本文整理汇总了PHP中testplan::html_table_of_custom_field_values方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::html_table_of_custom_field_values方法的具体用法?PHP testplan::html_table_of_custom_field_values怎么用?PHP testplan::html_table_of_custom_field_values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::html_table_of_custom_field_values方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderTestSpecTreeForPrinting
function renderTestSpecTreeForPrinting(&$db, &$node, $item_type, &$options, $tocPrefix, $tcCnt, $level, $user_id, $tplan_id = 0, $tcPrefix = null, $tprojectID = 0, $platform_id = 0)
{
static $tree_mgr;
static $map_id_descr;
static $tplan_mgr;
$code = null;
if (!$tree_mgr) {
$tplan_mgr = new testplan($db);
$tree_mgr = new tree($db);
$map_id_descr = $tree_mgr->node_types;
}
$verbose_node_type = $map_id_descr[intval($node['node_type_id'])];
switch ($verbose_node_type) {
case 'testproject':
if ($tplan_id != 0) {
// we are printing a test plan, get it's custom fields
$cfieldFormatting = array('table_css_style' => 'class="cf"');
if ($options['cfields']) {
$cfields = $tplan_mgr->html_table_of_custom_field_values($tplan_id, 'design', null, $cfieldFormatting);
$code .= '<p>' . $cfields . '</p>';
}
}
// platform changes - $code .= renderTOC($options);
break;
case 'testsuite':
$tocPrefix .= (!is_null($tocPrefix) ? "." : '') . $tcCnt;
$code .= renderTestSuiteNodeForPrinting($db, $node, $options, $tocPrefix, $level, $tplan_id, $tprojectID);
break;
case 'testcase':
$context = new stdClass();
$context->tproject_id = $tprojectID;
$context->tplan_id = $tplan_id;
$context->platform_id = $platform_id;
$context->tcase_prefix = $tcPrefix;
$code .= renderTestCaseForPrinting($db, $node, $options, $level, $context);
break;
}
if (isset($node['childNodes']) && $node['childNodes']) {
$childNodes = $node['childNodes'];
$tsCnt = 0;
$children_qty = sizeof($childNodes);
for ($i = 0; $i < $children_qty; $i++) {
$current = $childNodes[$i];
if (is_null($current)) {
continue;
}
if (isset($current['node_type_id']) && $map_id_descr[$current['node_type_id']] == 'testsuite') {
$tsCnt++;
}
// BUGID 3459 - added $platform_id
$code .= renderTestSpecTreeForPrinting($db, $current, $item_type, $options, $tocPrefix, $tsCnt, $level + 1, $user_id, $tplan_id, $tcPrefix, $tprojectID, $platform_id);
}
}
if ($verbose_node_type == 'testproject') {
if ($options['toc']) {
// remove for platforms feature
// $options['tocCode'] .= '</div><hr />';
$code = str_replace("{{INSERT_TOC}}", $options['tocCode'], $code);
}
}
return $code;
}