diff --git a/module/project/test/model/getpairsbyprogram.php b/module/project/test/model/getpairsbyprogram.php index eb58e5a13a..87a955c258 100755 --- a/module/project/test/model/getpairsbyprogram.php +++ b/module/project/test/model/getpairsbyprogram.php @@ -1,6 +1,7 @@ #!/usr/bin/env php gen(50); su('admin'); /** @@ -9,19 +10,20 @@ title=测试 projectModel->getPairsByProgram(); cid=1 pid=1 -查找管理员可查看的所有项目数量 >> 110 +查找管理员可查看的所有项目数量 >> 4 查找独立项目数量 >> 0 -查找管理员可查看的所属项目集ID为1的项目数量 >> 9 -查找管理员可查看的所属项目集ID为1且状态为wait的项目数量 >> 3 -查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量 >> 9 +查找管理员可查看的所属项目集ID为1的项目数量 >> 4 +查找管理员可查看的所属项目集ID为1且状态为wait的项目数量 >> 1 +查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量 >> 4 */ global $tester; +$tester->loadModel('user')->updateProjectView(range(1, 50), array('admin')); $tester->loadModel('project'); -r(count($tester->project->getPairsByProgram('', 'all', true))) && p() && e('110'); // 查找管理员可查看的所有项目数量 -r(count($tester->project->getPairsByProgram(0))) && p() && e('0'); // 查找独立项目数量 -r(count($tester->project->getPairsByProgram(1))) && p() && e('9'); // 查找管理员可查看的所属项目集ID为1的项目数量 -r(count($tester->project->getPairsByProgram(1, 'wait'))) && p() && e('3'); // 查找管理员可查看的所属项目集ID为1且状态为wait的项目数量 -r(count($tester->project->getPairsByProgram(1, 'noclosed'))) && p() && e('9'); // 查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量 +r(count($tester->project->getPairsByProgram(10, 'all', true))) && p() && e('4'); // 查找管理员可查看的所有项目数量 +r(count($tester->project->getPairsByProgram())) && p() && e('0'); // 查找独立项目数量 +r(count($tester->project->getPairsByProgram(1))) && p() && e('4'); // 查找管理员可查看的所属项目集ID为1的项目数量 +r(count($tester->project->getPairsByProgram(1, 'wait'))) && p() && e('1'); // 查找管理员可查看的所属项目集ID为1且状态为wait的项目数量 +r(count($tester->project->getPairsByProgram(1, 'noclosed'))) && p() && e('4'); // 查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量