Adjust code for getprojectexecutionpairs unit test.

This commit is contained in:
liuhong
2023-05-09 18:53:55 +08:00
parent 5b55341618
commit b01aa4f46c
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -892,7 +892,7 @@ class projectModel extends model
return $this->dao->select('project, id')->from(TABLE_PROJECT)
->where('multiple')->eq('0')
->andWhere('deleted')->eq('0')
->fetchPairs();
->fetchPairs('id', 'project');
}
/**
@@ -18,4 +18,7 @@ $tester->loadModel('project');
$project = $tester->project->getProjectExecutionPairs();
r(count($project)) && p() && e('6');
r(count($project)) && p() && e('6'); //查看全部项目与执行键值对数组数量为6
r($project[4]) && p() && e('3'); //查看瀑布项目编号为3的阶段4
r($project[5]) && p() && e('3'); //查看瀑布项目编号为3的阶段5
r($project[6]) && p() && e('0'); //查看scrum项目编号为6的无执行
@@ -14,6 +14,8 @@ fields:
range: 'wait,doing,closed,suspended'
- field: parent
range: 0, 1, 0, 3, 3, 0
- field: multiple
range: 0
- field: path
range: '`,1,`, `,1,2,`, `,3,`, `,3,4,`, `,3,4,5,`, `,6,`'
- field: hasProduct