From 1125cfc54363513e48a2d4c73e06f32b33ae55c7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 11 Sep 2023 17:00:13 +0800 Subject: [PATCH] - Delete unuse case. --- module/execution/test/execution.class.php | 40 --------------- module/execution/test/model/updatechilds.php | 51 -------------------- 2 files changed, 91 deletions(-) delete mode 100755 module/execution/test/model/updatechilds.php diff --git a/module/execution/test/execution.class.php b/module/execution/test/execution.class.php index e880154f34..ded1af4dcc 100644 --- a/module/execution/test/execution.class.php +++ b/module/execution/test/execution.class.php @@ -1247,46 +1247,6 @@ class executionTest return $this->executionModel->importBug($tasks); } - /** - * function updateChilds test by execution - * - * @param string $executionID - * @param string $count - * @param array $param - * @access public - * @return array - */ - public function updateChildsTest($executionID, $count, $param = array()) - { - global $tester; - - $childs = array(); - $createFields = array('childs' => $childs); - - foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; - foreach($param as $key => $value) $_POST[$key] = $value; - - $object = $this->executionModel->updateChilds($executionID); - - unset($_POST); - - if(dao::isError()) - { - $error = dao::getError(); - return $error; - } - elseif($count == "1") - { - $childExecutions = $tester->dbh->query("select id,name,type from zt_project where parent = $executionID")->fetchAll(); - return count($childExecutions); - } - else - { - $childExecutions = $tester->dbh->query("select id,name,type from zt_project where parent = $executionID")->fetchAll(); - return $childExecutions; - } - } - /** * 修改执行的所属项目。 * Change execution project. diff --git a/module/execution/test/model/updatechilds.php b/module/execution/test/model/updatechilds.php deleted file mode 100755 index 1de530b30b..0000000000 --- a/module/execution/test/model/updatechilds.php +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env php -id->range('1-11'); -$execution->name->setFields(array( - array('field' => 'name1', 'range' => '项目{2},执行{3},迭代{2},阶段{2},看板{2}'), - array('field' => 'name2', 'range' => '1-3'), -)); -$execution->type->range('project{2},sprint{5},waterfall{2},kanban{2}'); -$execution->status->range('doing{11}'); -$execution->parent->range('0'); -$execution->begin->range('20230102 000000:0')->type('timestamp')->format('YY/MM/DD'); -$execution->end->range('20230212 000000:0')->type('timestamp')->format('YY/MM/DD'); -$execution->gen(11); -su('admin'); - -/** - -title=测试executionModel->updateChildsTest(); -cid=1 -pid=1 - -修改敏捷执行的父执行 >> 6,迭代3 -修改敏捷执行的父执行 >> 9,阶段3 -修改敏捷执行的父执行 >> 10,看板1 -修改敏捷执行的父执行 >> 2 -修改敏捷执行的父执行 >> 2 -修改敏捷执行的父执行 >> 2 - -*/ - -$executionIDList = array('3', '4', '5'); -$sprintExecutionID = array('6', '7'); -$stageExecutionID = array('8', '9'); -$kanbanExecutionID = array('10', '11'); -$count = array('0','1'); - -$sprintChilds = array('childs' => $sprintExecutionID); -$stageChilds = array('childs' => $stageExecutionID); -$kanbanChilds = array('childs' => $kanbanExecutionID); - -$execution = new executionTest(); -r($execution->updateChildsTest($executionIDList[0], $count[0], $sprintChilds)) && p('0:id,name') && e('6,迭代3'); // 修改敏捷执行的父执行 -r($execution->updateChildsTest($executionIDList[1], $count[0], $stageChilds)) && p('1:id,name') && e('9,阶段3'); // 修改敏捷执行的父执行 -r($execution->updateChildsTest($executionIDList[2], $count[0], $kanbanChilds)) && p('0:id,name') && e('10,看板1'); // 修改敏捷执行的父执行 -r($execution->updateChildsTest($executionIDList[0], $count[1], $sprintChilds)) && p() && e('2'); // 修改敏捷执行的父执行 -r($execution->updateChildsTest($executionIDList[1], $count[1], $stageChilds)) && p() && e('2'); // 修改敏捷执行的父执行 -r($execution->updateChildsTest($executionIDList[2], $count[1], $kanbanChilds)) && p() && e('2'); // 修改敏捷执行的父执行