diff --git a/module/testreport/test/model/getcaseidlist.php b/module/testreport/test/model/getcaseidlist.php index 57110fb216..745ecc310c 100755 --- a/module/testreport/test/model/getcaseidlist.php +++ b/module/testreport/test/model/getcaseidlist.php @@ -2,6 +2,10 @@ gen(5); +zdTable('user')->gen(1); + su('admin'); /** @@ -10,19 +14,11 @@ title=测试 testreportModel->getCaseIdList(); timeout=0 cid=1 -- 正常查询 - - 属性1 @1 - - 属性4 @4 -- 查询创建者不为自己的数据 - - 属性5 @5 - - 属性8 @8 -- 查询reportID为空的数据 @0 - */ -$reportID = array('1', '2', ''); +$reportID = array(1, 2, 0); $testreport = new testreportTest(); r($testreport->getCaseIdListTest($reportID[0])) && p('1,4') && e('1,4'); //正常查询 r($testreport->getCaseIdListTest($reportID[1])) && p('5,8') && e('5,8'); //查询创建者不为自己的数据 -r($testreport->getCaseIdListTest($reportID[2])) && p() && e('0'); //查询reportID为空的数据 \ No newline at end of file +r($testreport->getCaseIdListTest($reportID[2])) && p() && e('0'); //查询reportID为空的数据 diff --git a/module/testreport/test/testreport.class.php b/module/testreport/test/testreport.class.php index 73e8f84c4b..227ff7a8c3 100644 --- a/module/testreport/test/testreport.class.php +++ b/module/testreport/test/testreport.class.php @@ -75,7 +75,6 @@ class testreportTest * @access public * @return array|object|false */ - public function getByIdTest(int $reportID): array|object|false { $object = $this->objectModel->getById($reportID); @@ -117,7 +116,6 @@ class testreportTest * @access public * @return array */ - public function getTaskCasesTest(int $taskID, int $reportID, string $idList = '', object $pager = null): array { $tasks = $taskID ? $this->testtask->getByList((array)$taskID) : array(); @@ -129,16 +127,16 @@ class testreportTest return $objects; } + /** * 测试获取测试报告的 caseID 列表。 - * Get caseID list. + * Get case id list. * * @param int $reportID * @access public * @return array */ - - public function getCaseIdListTest($reportID): array + public function getCaseIdListTest(int $reportID): array { $objects = $this->objectModel->getCaseIdList($reportID); @@ -146,6 +144,7 @@ class testreportTest return $objects; } + /** * 获取报告的概况。 * Get result summary. @@ -155,7 +154,6 @@ class testreportTest * @access public * @return string|array */ - public function getResultSummaryTest(int $taskID, int $reportID): array|string { $tasks = $taskID ? $this->testtask->getByList((array)$taskID) : array(); @@ -225,7 +223,6 @@ class testreportTest * @access public * @return array|string|false */ - public function getBugs4TestTest(string $buildIdList, int $productID, int $taskID, string $type = 'build'): array|string|false { $task = $this->testtask->getByID($taskID);