From 6f6112e7984ddd7707dba3623dc1c772aa7ba4ec 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 13:07:44 +0800 Subject: [PATCH] * Add case of execution model. --- test/model/execution/getpairs.php | 41 +++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/test/model/execution/getpairs.php b/test/model/execution/getpairs.php index 0cbec10db4..208742b465 100755 --- a/test/model/execution/getpairs.php +++ b/test/model/execution/getpairs.php @@ -2,8 +2,23 @@ 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->getPairsTest(); @@ -11,23 +26,23 @@ cid=1 pid=1 敏捷项目执行查看 >> 迭代1 -瀑布项目执行查看 >> 阶段121 -看板项目执行查看 >> 看板61 -敏捷项目执行统计 >> 7 -敏捷项目执行统计 >> 8 -敏捷项目执行统计 >> 6 +瀑布项目执行查看 >> 阶段1 +看板项目执行查看 >> 看板1 +敏捷项目执行统计 >> 1 +敏捷项目执行统计 >> 1 +敏捷项目执行统计 >> 1 */ -$projectIDList = array('11', '41', '71'); +$projectIDList = array(2, 3, 4); $count = array('0','1'); $noRealEnd = array('realEnd' => ''); $readjustTime = array('readjustTime' => '1'); -$execution = new executionTest(); -r($execution->getPairsTest($projectIDList[0],$count[0])) && p('101') && e('迭代1'); // 敏捷项目执行查看 -r($execution->getPairsTest($projectIDList[1],$count[0])) && p('221') && e('阶段121'); // 瀑布项目执行查看 -r($execution->getPairsTest($projectIDList[2],$count[0])) && p('161') && e('看板61'); // 看板项目执行查看 -r($execution->getPairsTest($projectIDList[0],$count[1])) && p() && e('7'); // 敏捷项目执行统计 -r($execution->getPairsTest($projectIDList[1],$count[1])) && p() && e('8'); // 敏捷项目执行统计 -r($execution->getPairsTest($projectIDList[2],$count[1])) && p() && e('6'); // 敏捷项目执行统计 \ No newline at end of file +$executionTester = new executionTest(); +r($executionTester->getPairsTest($projectIDList[0],$count[0])) && p('5') && e('迭代1'); // 敏捷项目执行查看 +r($executionTester->getPairsTest($projectIDList[1],$count[0])) && p('6') && e('阶段1'); // 瀑布项目执行查看 +r($executionTester->getPairsTest($projectIDList[2],$count[0])) && p('7') && e('看板1'); // 看板项目执行查看 +r($executionTester->getPairsTest($projectIDList[0],$count[1])) && p() && e('1'); // 敏捷项目执行统计 +r($executionTester->getPairsTest($projectIDList[1],$count[1])) && p() && e('1'); // 敏捷项目执行统计 +r($executionTester->getPairsTest($projectIDList[2],$count[1])) && p() && e('1'); // 敏捷项目执行统计