Exemplo n.º 1
0
/**
 * 
 * 
 * @param integer $level
 * @param array &$node reference to recursive map
 * @param array &$tcases_map reference to map that contains info about testcase exec status
 *              when node is of testcase type.
 * @param boolean $bHideTCs 1 -> hide testcase
 * 
 * @return datatype description
 * 
 * @internal Revisions:
 *	20100611 - franciscom - removed useless $getArguments
 *	20071229 - franciscom -added $useCounters,$useColors
 */
function renderExecTreeNode($level, &$node, &$tcase_node, $hash_id_descr, $tc_action_enabled, $linkto, $bHideTCs, $useCounters, $useColors, $showTestCaseID, $testCasePrefix, $showTestSuiteContents)
{
    $node_type = $hash_id_descr[$node['node_type_id']];
    $menustring = '';
    extjs_renderExecTreeNodeOnOpen($node, $node_type, $tcase_node, $tc_action_enabled, $bHideTCs, $useCounters, $useColors, $showTestCaseID, $testCasePrefix, $showTestSuiteContents);
    if (isset($tcase_node[$node['id']])) {
        unset($tcase_node[$node['id']]);
    }
    if (isset($node['childNodes']) && $node['childNodes']) {
        // 20080615 - franciscom - need to work always original object
        //                         in order to change it's values using reference .
        // Can not assign anymore to intermediate variables.
        $nodes_qty = sizeof($node['childNodes']);
        for ($idx = 0; $idx < $nodes_qty; $idx++) {
            if (is_null($node['childNodes'][$idx])) {
                continue;
            }
            $menustring .= renderExecTreeNode($level + 1, $node['childNodes'][$idx], $tcase_node, $hash_id_descr, $tc_action_enabled, $linkto, $bHideTCs, $useCounters, $useColors, $showTestCaseID, $testCasePrefix, $showTestSuiteContents);
        }
    }
    return $menustring;
}
Exemplo n.º 2
0
 /**
  * 
  * 
  * @param integer $level
  * @param array &$node reference to recursive map
  * @param array &$tcases_map reference to map that contains info about testcase exec status
  *              when node is of testcase type.
  * @param boolean $bHideTCs 1 -> hide testcase
  * 
  * @return datatype description
  * 
  * @internal revisions
  */
 function renderExecTreeNode($env, $level, &$node, &$tcase_node, $linkto, $options, $auxCfg)
 {
     $node_type = $auxCfg['hash_id_descr'][$node['node_type_id']];
     $nodeAttr = array('node_type' => $node_type, 'testCasePrefix' => $auxCfg['testCasePrefix']);
     extjs_renderExecTreeNodeOnOpen($node, $nodeAttr, $tcase_node, $options, $env);
     // echo $node['id'] . '<br>';
     // new dBug($tcase_node);
     if (isset($tcase_node[$node['id']])) {
         unset($tcase_node[$node['id']]);
     }
     if (isset($node['childNodes']) && $node['childNodes']) {
         // 20080615 - franciscom - need to work always original object
         //                         in order to change it's values using reference .
         // Can not assign anymore to intermediate variables.
         $nodes_qty = sizeof($node['childNodes']);
         for ($idx = 0; $idx < $nodes_qty; $idx++) {
             if (is_null($node['childNodes'][$idx])) {
                 continue;
             }
             renderExecTreeNode($env, $level + 1, $node['childNodes'][$idx], $tcase_node, $linkto, $options, $auxCfg);
         }
     }
 }