diff --git a/module/testcase/tao.php b/module/testcase/tao.php index 5691a84b32..b35c999dcb 100644 --- a/module/testcase/tao.php +++ b/module/testcase/tao.php @@ -516,6 +516,7 @@ class testcaseTao extends testcaseModel } /** + * 获取待评审的用例数量。 * Get the amount of cases pending review. * * @access protected diff --git a/module/testcase/test/tao/getreviewamount.php b/module/testcase/test/tao/getreviewamount.php new file mode 100644 index 0000000000..8265fb50fc --- /dev/null +++ b/module/testcase/test/tao/getreviewamount.php @@ -0,0 +1,21 @@ +#!/usr/bin/env php +gen(30); +zdTable('user')->gen(1); + +su('admin'); + +/** + +title=测试 testcaseTao->getReviewAmount(); +cid=1 +pid=1 + +*/ + +$testcase = new testcaseTest(); + +r($testcase->getReviewAmountTest()) && p() && e('7'); // 测试查询待评审的用例数量 diff --git a/module/testcase/test/testcase.class.php b/module/testcase/test/testcase.class.php index c1150c1f32..69ae83c3c8 100755 --- a/module/testcase/test/testcase.class.php +++ b/module/testcase/test/testcase.class.php @@ -1784,4 +1784,20 @@ class testcaseTest $return = "id:{$scene->id}, parent:{$scene->parent}, path:{$scene->path}, grade:{$scene->grade}"; return $return; } + + /** + * 测试获取待评审的用例数量。 + * Test get the amount of cases pending review. + * + * @access public + * @return int|array + */ + public function getReviewAmountTest(): int|array + { + $count = $this->objectModel->getReviewAmount(); + + if(dao::isError()) return dao::getError(); + + return $count; + } }