diff --git a/test/model/execution/getstagelinkproductpairs.php b/test/model/execution/getstagelinkproductpairs.php index 2e04fbe066..a836175b1f 100755 --- a/test/model/execution/getstagelinkproductpairs.php +++ b/test/model/execution/getstagelinkproductpairs.php @@ -2,32 +2,70 @@ gen(5); su('admin'); +$product = zdTable('product'); +$product->id->range('1-3'); +$product->name->range('正常产品1,多分支产品1,多平台产品1'); +$product->type->range('normal,branch,platform'); +$product->status->range('closed{2},normal'); +$product->createdBy->range('admin,user1'); +$product->gen(3); + +$projectproduct = zdTable('projectproduct'); +$projectproduct->project->range('5-10'); +$projectproduct->product->range('1-3'); +$projectproduct->plan->range('1-3'); +$projectproduct->gen(5); + +$branch = zdTable('branch'); +$branch->id->range('1-2'); +$branch->product->range('2'); +$branch->name->range('分支1,分支2'); +$branch->status->range('active'); +$branch->gen(2); + +zdTable('team')->gen(0); + +$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->getStageLinkProductPairsTest(); cid=1 pid=1 -敏捷执行产品查询 >> 多平台产品91 -瀑布执行产品查询 >> 已关闭的正常产品31 -看板执行产品查询 >> 已关闭的多分支产品61 -敏捷执行产品统计 >> 3 -瀑布执行产品统计 >> 3 -看板执行产品统计 >> 3 +敏捷执行产品查询 >> 正常产品1 +瀑布执行产品查询 >> 多平台产品1 +看板执行产品查询 >> 多分支产品1 +敏捷执行产品统计 >> 2 +瀑布执行产品统计 >> 2 +看板执行产品统计 >> 1 */ -$sprintIDList = array('101', '102', '103'); -$stageIDList = array('131', '132', '133'); -$kanbanIDList = array('161', '162', '163'); +$sprintIDList = array('5', '6'); +$stageIDList = array('7', '8'); +$kanbanIDList = array('9', '10'); $count = array('0','1'); $execution = new executionTest(); -r($execution->getStageLinkProductPairsTest($sprintIDList, $count[0])) && p('101') && e('多平台产品91'); // 敏捷执行产品查询 -r($execution->getStageLinkProductPairsTest($stageIDList, $count[0])) && p('131') && e('已关闭的正常产品31'); // 瀑布执行产品查询 -r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[0])) && p('161') && e('已关闭的多分支产品61'); // 看板执行产品查询 -r($execution->getStageLinkProductPairsTest($sprintIDList, $count[1])) && p() && e('3'); // 敏捷执行产品统计 -r($execution->getStageLinkProductPairsTest($stageIDList, $count[1])) && p() && e('3'); // 瀑布执行产品统计 -r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[1])) && p() && e('3'); // 看板执行产品统计 \ No newline at end of file +r($execution->getStageLinkProductPairsTest($sprintIDList, $count[0])) && p('5') && e('正常产品1'); // 敏捷执行产品查询 +r($execution->getStageLinkProductPairsTest($stageIDList, $count[0])) && p('7') && e('多平台产品1'); // 瀑布执行产品查询 +r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[0])) && p('9') && e('多分支产品1'); // 看板执行产品查询 +r($execution->getStageLinkProductPairsTest($sprintIDList, $count[1])) && p() && e('2'); // 敏捷执行产品统计 +r($execution->getStageLinkProductPairsTest($stageIDList, $count[1])) && p() && e('2'); // 瀑布执行产品统计 +r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[1])) && p() && e('1'); // 看板执行产品统计