本文整理汇总了PHP中testplan::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::__construct方法的具体用法?PHP testplan::__construct怎么用?PHP testplan::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::__construct方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
/**
* class constructor
* @param resource &$db reference to database handler
**/
function __construct(&$db)
{
$this->resultsCfg = config_get('results');
$this->testCaseCfg = config_get('testcase_cfg');
$this->db = $db;
parent::__construct($db);
$this->map_tc_status = $this->resultsCfg['status_code'];
// This will be used to create dynamically counters if user add new status
foreach ($this->resultsCfg['status_label_for_exec_ui'] as $tc_status_verbose => $label) {
$this->tc_status_for_statistics[$tc_status_verbose] = $this->map_tc_status[$tc_status_verbose];
}
if (!isset($this->resultsCfg['status_label_for_exec_ui']['not_run'])) {
$this->tc_status_for_statistics['not_run'] = $this->map_tc_status['not_run'];
}
$this->statusCode = array_flip(array_keys($this->resultsCfg['status_label_for_exec_ui']));
foreach ($this->statusCode as $key => $dummy) {
$this->statusCode[$key] = $this->resultsCfg['status_code'][$key];
}
}