From ea1c2214beae23c5912d6c4ff01b66c2f671196a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B7=91=E6=9D=B0?= Date: Wed, 11 Jan 2023 09:33:29 +0800 Subject: [PATCH] * Add case of execution model. --- test/model/execution/getidlist.php | 56 ++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/test/model/execution/getidlist.php b/test/model/execution/getidlist.php index e7cc5d1697..447fcde12b 100755 --- a/test/model/execution/getidlist.php +++ b/test/model/execution/getidlist.php @@ -2,30 +2,58 @@ id->range('1-10'); +$execution->name->range('项目集1,项目1,项目2,项目3,迭代1,迭代2,阶段1,阶段2,看板1,看板2'); +$execution->type->range('program,project{3},sprint{2},stage{2},kanban{2}'); +$execution->model->range('[],scrum,waterfall,kanban,[]{6}'); +$execution->parent->range('0,1{3},2{2},3{2},4{2}'); +$execution->project->range('0{4},2{2},3{2},4{2}'); +$execution->status->range('doing'); +$execution->vision->range('rnd'); +$execution->openedBy->range('admin,user1'); +$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->gen(10); su('admin'); +$execution = zdTable('project'); +$execution->id->range('1-10'); +$execution->name->range('项目集1,项目1,项目2,项目3,迭代1,迭代2,阶段1,阶段2,看板1,看板2'); +$execution->type->range('program,project{3},sprint{2},stage{2},kanban{2}'); +$execution->model->range('[],scrum,waterfall,kanban,[]{6}'); +$execution->parent->range('0,1{3},2{2},3{2},4{2}'); +$execution->project->range('0{4},2{2},3{2},4{2}'); +$execution->status->range('doing'); +$execution->vision->range('rnd'); +$execution->openedBy->range('admin,user1'); +$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->gen(10); + /** title=测试executionModel->getIdListTest(); cid=1 pid=1 -敏捷项目下执行id查询 >> 101 -瀑布项目下执行id查询 >> 131 -看板项目下执行id查询 >> 161 -敏捷项目下执行id数量统计 >> 7 -敏捷项目下执行id数量统计 >> 8 -敏捷项目下执行id数量统计 >> 6 +敏捷项目下执行id查询 >> 5 +瀑布项目下执行id查询 >> 7 +看板项目下执行id查询 >> 9 +敏捷项目下执行id数量统计 >> 2 +敏捷项目下执行id数量统计 >> 2 +敏捷项目下执行id数量统计 >> 2 */ -$projectIDList = array('11', '41', '71'); +$projectIDList = array(2, 3, 4); $count = array('0','1'); -$execution = new executionTest(); -r($execution->getIdListTest($projectIDList[0],$count[0])) && p('101') && e('101'); // 敏捷项目下执行id查询 -r($execution->getIdListTest($projectIDList[1],$count[0])) && p('131') && e('131'); // 瀑布项目下执行id查询 -r($execution->getIdListTest($projectIDList[2],$count[0])) && p('161') && e('161'); // 看板项目下执行id查询 -r($execution->getIdListTest($projectIDList[0],$count[1])) && p() && e('7'); // 敏捷项目下执行id数量统计 -r($execution->getIdListTest($projectIDList[1],$count[1])) && p() && e('8'); // 敏捷项目下执行id数量统计 -r($execution->getIdListTest($projectIDList[2],$count[1])) && p() && e('6'); // 敏捷项目下执行id数量统计 \ No newline at end of file +$executionTester = new executionTest(); +r($executionTester->getIdListTest($projectIDList[0],$count[0])) && p('5') && e('5'); // 敏捷项目下执行id查询 +r($executionTester->getIdListTest($projectIDList[1],$count[0])) && p('7') && e('7'); // 瀑布项目下执行id查询 +r($executionTester->getIdListTest($projectIDList[2],$count[0])) && p('9') && e('9'); // 看板项目下执行id查询 +r($executionTester->getIdListTest($projectIDList[0],$count[1])) && p() && e('2'); // 敏捷项目下执行id数量统计 +r($executionTester->getIdListTest($projectIDList[1],$count[1])) && p() && e('2'); // 敏捷项目下执行id数量统计 +r($executionTester->getIdListTest($projectIDList[2],$count[1])) && p() && e('2'); // 敏捷项目下执行id数量统计