From 3ccc06366f8c7779013e25f148f4ef52482c1e97 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 11 Jan 2023 08:59:27 +0800 Subject: [PATCH] * Update test case. --- test/model/execution/gettotalestimate.php | 38 ++++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/test/model/execution/gettotalestimate.php b/test/model/execution/gettotalestimate.php index cf2204d8ba..191b56fc19 100755 --- a/test/model/execution/gettotalestimate.php +++ b/test/model/execution/gettotalestimate.php @@ -2,6 +2,28 @@ id->range('1-5'); +$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3'); +$execution->type->range('project{2},sprint,waterfall,kanban'); +$execution->status->range('doing{3},closed,doing'); +$execution->parent->range('0,0,1,1,2'); +$execution->grade->range('2{2},1{3}'); +$execution->path->range('1,2,`1,3`,`1,4`,`2,5`')->prefix(',')->postfix(','); +$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(5); + +$task = zdTable('task'); +$task->id->range('1-10'); +$task->execution->range('3,4,5'); +$task->status->range('wait,doing'); +$task->estimate->range('6'); +$task->left->range('3'); +$task->consumed->range('3'); +$task->gen(10); + su('admin'); /** @@ -10,17 +32,17 @@ title=测试executionModel->getTotalEstimateTest(); cid=1 pid=1 -敏捷执行预计工时统计 >> 48 -瀑布执行预计工时统计 >> 17 -看板执行预计工时统计 >> 20 +敏捷执行预计工时统计 >> 24 +瀑布执行预计工时统计 >> 18 +看板执行预计工时统计 >> 18 无执行预计工时统计 >> 0 */ -$executionIDList = array('101', '131', '161'); +$executionIDList = array('3', '4', '5'); $execution = new executionTest(); -r($execution->getTotalEstimateTest($executionIDList[0])) && p() && e('48'); // 敏捷执行预计工时统计 -r($execution->getTotalEstimateTest($executionIDList[1])) && p() && e('17'); // 瀑布执行预计工时统计 -r($execution->getTotalEstimateTest($executionIDList[2])) && p() && e('20'); // 看板执行预计工时统计 -r($execution->getTotalEstimateTest('')) && p() && e('0'); // 无执行预计工时统计 \ No newline at end of file +r($execution->getTotalEstimateTest($executionIDList[0])) && p() && e('24'); // 敏捷执行预计工时统计 +r($execution->getTotalEstimateTest($executionIDList[1])) && p() && e('18'); // 瀑布执行预计工时统计 +r($execution->getTotalEstimateTest($executionIDList[2])) && p() && e('18'); // 看板执行预计工时统计 +r($execution->getTotalEstimateTest('')) && p() && e('0'); // 无执行预计工时统计