本文整理汇总了PHP中testplan::getRootTestSuites方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::getRootTestSuites方法的具体用法?PHP testplan::getRootTestSuites怎么用?PHP testplan::getRootTestSuites使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::getRootTestSuites方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeGui
function initializeGui(&$dbHandler, $args)
{
$gui = new stdClass();
$tplan_mgr = new testplan($dbHandler);
$gui_open = config_get('gui_separator_open');
$gui_close = config_get('gui_separator_close');
$gui->str_option_any = $gui_open . lang_get('any') . $gui_close;
$gui->str_option_none = $gui_open . lang_get('nobody') . $gui_close;
$gui->tplan_id = $args->tplan_id;
$gui->tproject_id = $args->tproject_id;
$tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
$gui->tplan_name = $tplan_info['name'];
unset($tplan_info);
$ni = $tplan_mgr->tree_manager->get_node_hierarchy_info($gui->tproject_id);
$gui->tproject_name = $ni['name'];
unset($ni);
$gui->assigned_users = new stdClass();
$gui->keywords = new stdClass();
$gui->builds = new stdClass();
$gui->platforms = new stdClass();
$gui->testsuites = new stdClass();
// 20090107 - franciscom
// Show only users that are able to execute test cases ?
// What happens if a user that has loose right to execute, but
// before loosing this right has been assigned some tests, or have executed it?
//
// $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, ADD_BLANK_OPTION);
// $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER,
// array(TL_USER_ANYBODY => $gui->str_option_any,
// TL_USER_NOBODY => $gui->str_option_none) );
//
$gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, array(TL_USER_ANYBODY => $gui->str_option_any));
$gui->builds->items = $tplan_mgr->get_builds($gui->tplan_id, testplan::ACTIVE_BUILDS);
$gui->platforms->items = $tplan_mgr->getPlatforms($gui->tplan_id);
$gui->testsuites->items = $tplan_mgr->getRootTestSuites($gui->tplan_id, $gui->tproject_id, array('output' => 'plain'));
$gui->keywords->items[0] = $gui->str_option_any;
if (!is_null($tplan_keywords_map = $tplan_mgr->get_keywords_map($gui->tplan_id))) {
$gui->keywords->items += $tplan_keywords_map;
}
$key2loop = array('keywords', 'builds', 'platforms', 'testsuites', 'assigned_users');
foreach ($key2loop as $kx) {
$gui->{$kx}->qty = count($gui->{$kx}->items);
}
$gui->status_code_label = get_status_for_reports_html_options();
$gui->report_type = $args->format;
$reports_cfg = config_get('reportsCfg');
$ldf = config_get('locales_date_format');
$date_format = $ldf[isset($_SESSION['locale']) ? $_SESSION['locale'] : 'en_GB'];
$gui->selected_start_date = strftime($date_format, time() - $reports_cfg->start_date_offset);
$gui->selected_start_time = $reports_cfg->start_time;
$gui->selected_end_date = strftime($date_format, time());
$gui->selected_end_time = null;
return $gui;
}