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


PHP testplan::create方法代码示例

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


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

示例1: migrate_test_plans

function migrate_test_plans(&$source_db, &$target_db, &$tplans, &$old_new)
{
    $tplan_mgr = new testplan($target_db);
    $tplan_qty = count($tplans);
    echo "<pre>   Test plans to migrate: " . $tplan_qty;
    echo "</pre>";
    foreach ($tplans as $item_id => $idata) {
        $old_prodid = intval($idata['prodid']);
        $tproj_id = 0;
        if ($old_prodid > 0) {
            $tproj_id = $old_new['product'][$old_prodid];
        }
        $old_new['tplan'][$item_id] = $tplan_mgr->create($idata['name'], $idata['notes'], $tproj_id);
        //echo "OLD TPlan ID {$item_id} {$idata['name']} -> {$old_new['tplan'][$item_id]} <br>";
        // 20070130 - jbarchibald
        if (intval($idata['active']) == 0) {
            $sql = "UPDATE testplans SET active=0 WHERE testplans.id={$old_new['tplan'][$item_id]}";
            $target_db->exec_query($sql);
        }
    }
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:21,代码来源:migrate_16_to_17_functions.php

示例2: copy_testplans

 /**
  * 
  *
  */
 private function copy_testplans($source_id, $target_id, $user_id, $mappings)
 {
     static $tplanMgr;
     $tplanSet = $this->get_all_testplans($source_id);
     if (!is_null($tplanSet)) {
         $keySet = array_keys($tplanSet);
         if (is_null($tplanMgr)) {
             $tplanMgr = new testplan($this->db);
         }
         foreach ($keySet as $itemID) {
             $new_id = $tplanMgr->create($tplanSet[$itemID]['name'], $tplanSet[$itemID]['notes'], $target_id, $tplanSet[$itemID]['active'], $tplanSet[$itemID]['is_public']);
             if ($new_id > 0) {
                 // TICKET 5190: Copy Test projects - tester assignments to testplan+build are not copied
                 $tplanMgr->copy_as($itemID, $new_id, null, $target_id, $user_id, array('copy_assigned_to' => 1), $mappings);
             }
         }
     }
 }
开发者ID:JacekKarwas,项目名称:smutek,代码行数:22,代码来源:testproject.class.php

示例3: copy_testplans

 /**
  * 
  *
  */
 private function copy_testplans($source_id, $target_id, $user_id, $mappings)
 {
     static $tplanMgr;
     $tplanSet = $this->get_all_testplans($source_id);
     if (!is_null($tplanSet)) {
         $keySet = array_keys($tplanSet);
         if (is_null($tplanMgr)) {
             $tplanMgr = new testplan($this->db);
         }
         foreach ($keySet as $itemID) {
             $new_id = $tplanMgr->create($tplanSet[$itemID]['name'], $tplanSet[$itemID]['notes'], $target_id, $tplanSet[$itemID]['active'], $tplanSet[$itemID]['is_public']);
             if ($new_id > 0) {
                 $tplanMgr->copy_as($itemID, $new_id, null, $target_id, $user_id, null, $mappings);
             }
         }
     }
 }
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:21,代码来源:testproject.class.php

示例4: logAuditEvent

     }
     if (!$status_ok) {
         $gui->tplan_id = $args->tplan_id;
         $gui->tproject_name = $args->tproject_name;
         $gui->notes = $of->CreateHTML();
     }
     break;
 case 'do_create':
     $template = 'planEdit.tpl';
     $status_ok = false;
     $of->Value = $args->notes;
     $gui->testplan_name = $args->testplan_name;
     $gui->is_active = $args->active == 'on' ? 1 : 0;
     $gui->is_public = $args->is_public == 'on' ? 1 : 0;
     if (!$name_exists) {
         $new_tplan_id = $tplan_mgr->create($args->testplan_name, $args->notes, $args->tproject_id, $args->active, $args->is_public);
         if ($new_tplan_id == 0) {
             $gui->user_feedback = $db->error_msg();
         } else {
             logAuditEvent(TLS("audit_testplan_created", $args->tproject_name, $args->testplan_name), "CREATED", $new_tplan_id, "testplans");
             $cf_map = $tplan_mgr->get_linked_cfields_at_design($new_tplan_id, $args->tproject_id);
             $tplan_mgr->cfield_mgr->design_values_to_db($_REQUEST, $new_tplan_id, $cf_map);
             $status_ok = true;
             $template = null;
             $gui->user_feedback = '';
             if ($args->rights == 'on') {
                 $result = insertTestPlanUserRight($db, $new_tplan_id, $args->user_id);
             }
             if ($args->copy) {
                 // BUGID 3485: "Create from existing Test Plan" always copies builds
                 $options = array('items2copy' => $args->copy_options, 'copy_assigned_to' => $args->copy_assigned_to, 'tcversion_type' => $args->tcversion_type);
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:planEdit.php


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