From 6396d1786db2f43a0add6ded43c3a09b941f6138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B7=91=E6=9D=B0?= Date: Tue, 10 Jan 2023 13:43:06 +0800 Subject: [PATCH] * Add case of execution model. --- test/model/execution/getbyproject.php | 47 ++++++++++++++++++--------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/test/model/execution/getbyproject.php b/test/model/execution/getbyproject.php index 7af990cdad..39074182f8 100755 --- a/test/model/execution/getbyproject.php +++ b/test/model/execution/getbyproject.php @@ -2,34 +2,49 @@ gen(5); su('admin'); +$execution = zdTable('project'); +$execution->id->range('1-7'); +$execution->name->range('项目集1,项目1,项目2,项目3,迭代1,阶段1,看板1'); +$execution->type->range('program,project{3},sprint,stage,kanban'); +$execution->model->range('[],scrum,waterfall,kanban,[]{3}'); +$execution->parent->range('0,1{3},2,3,4'); +$execution->project->range('0{4},2,3,4'); +$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(7); + /** title=测试executionModel->getByProjectTest(); cid=1 pid=1 -敏捷项目执行列表查询 >> 11,迭代1 -瀑布项目执行列表查询 >> 41,已关闭的正常产品31/阶段31/子阶段1,stage -看板项目执行列表查询 >> 71,看板61,kanban -wait执行列表查询 >> wait,阶段581 -doing执行列表查询 >> doing,阶段582 -执行列表2条查询 >> 2 -执行列表10条查询 >> 10 +敏捷项目执行列表查询 >> 2,迭代1,sprint +瀑布项目执行列表查询 >> 3,阶段1,stage +看板项目执行列表查询 >> 4,看板1,kanban +wait执行列表查询 >> 0 +doing执行列表查询 >> doing,看板1 +执行列表2条查询 >> 0 +执行列表10条查询 >> 3 */ -$projectIDList = array('0', '11', '41', '71'); +$projectIDList = array(0, 2, 3, 4); $status = array('all', 'wait', 'doing'); $limit = array('0', '2', '10'); $count = array('0', '1'); -$execution = new executionTest(); -r($execution->getByProjectTest($projectIDList[1],$status[0],$limit[0],$count[0])) && p('101:project,name') && e('11,迭代1'); // 敏捷项目执行列表查询 -r($execution->getByProjectTest($projectIDList[2],$status[0],$limit[0],$count[0])) && p('701:project,name,type') && e('41,已关闭的正常产品31/阶段31/子阶段1,stage'); // 瀑布项目执行列表查询 -r($execution->getByProjectTest($projectIDList[3],$status[0],$limit[0],$count[0])) && p('161:project,name,type') && e('71,看板61,kanban'); // 看板项目执行列表查询 -r($execution->getByProjectTest($projectIDList[0],$status[1],$limit[0],$count[0])) && p('681:status,name') && e('wait,阶段581'); // wait执行列表查询 -r($execution->getByProjectTest($projectIDList[0],$status[2],$limit[0],$count[0])) && p('682:status,name') && e('doing,阶段582'); // doing执行列表查询 -r($execution->getByProjectTest($projectIDList[0],$status[1],$limit[1],$count[1])) && p() && e('2'); // 执行列表2条查询 -r($execution->getByProjectTest($projectIDList[0],$status[2],$limit[2],$count[1])) && p() && e('10'); // 执行列表10条查询 \ No newline at end of file +$executionTester = new executionTest(); +r($executionTester->getByProjectTest($projectIDList[1],$status[0],$limit[0],$count[0])) && p('5:project,name,type') && e('2,迭代1,sprint'); // 敏捷项目执行列表查询 +r($executionTester->getByProjectTest($projectIDList[2],$status[0],$limit[0],$count[0])) && p('6:project,name,type') && e('3,阶段1,stage'); // 瀑布项目执行列表查询 +r($executionTester->getByProjectTest($projectIDList[3],$status[0],$limit[0],$count[0])) && p('7:project,name,type') && e('4,看板1,kanban'); // 看板项目执行列表查询 +r($executionTester->getByProjectTest($projectIDList[0],$status[1],$limit[0],$count[0])) && p() && e('0'); // wait执行列表查询 +r($executionTester->getByProjectTest($projectIDList[0],$status[2],$limit[0],$count[0])) && p('7:status,name') && e('doing,看板1'); // doing执行列表查询 +r($executionTester->getByProjectTest($projectIDList[0],$status[1],$limit[1],$count[1])) && p() && e('0'); // 执行列表2条查询 +r($executionTester->getByProjectTest($projectIDList[0],$status[2],$limit[2],$count[1])) && p() && e('3'); // 执行列表10条查询