From 858b49a644425b7fa9c47b4c27f04062bade7745 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Wed, 12 Nov 2025 03:40:31 +0000 Subject: [PATCH] * [unittest] modify unittest. --- module/my/test/zen/showworkcountnotinopen.php | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/module/my/test/zen/showworkcountnotinopen.php b/module/my/test/zen/showworkcountnotinopen.php index 8c9a86ed6b..1931765361 100755 --- a/module/my/test/zen/showworkcountnotinopen.php +++ b/module/my/test/zen/showworkcountnotinopen.php @@ -7,19 +7,11 @@ title=测试 myZen::showWorkCountNotInOpen(); timeout=0 cid=0 -- 执行myTest模块的showWorkCountNotInOpenTest方法,参数是array - - 属性feedback @0 - - 属性ticket @0 -- 执行myTest模块的showWorkCountNotInOpenTest方法,参数是array - - 属性feedback @0 - - 属性ticket @0 -- 执行myTest模块的showWorkCountNotInOpenTest方法,参数是array - - 属性issue @0 - - 属性risk @0 - - 属性qa @3 - - 属性meeting @0 -- 执行myTest模块的showWorkCountNotInOpenTest方法,参数是array 属性demand @0 -- 执行myTest模块的showWorkCountNotInOpenTest方法,参数是array 属性qa @3 +- 查看各个模块的数量属性feedback @0 +- 查看各个模块的数量属性feedback @0 +- 查看各个模块的数量属性feedback @0 +- 查看各个模块的数量属性feedback @0 +- 查看各个模块的数量属性feedback @0 */ @@ -30,14 +22,14 @@ include dirname(__FILE__, 2) . '/lib/myzen.unittest.class.php'; su('admin'); zenData('feedback')->gen(0); -zenData('auditplan')->gen(0); -zenData('ticket')->gen(0); // 创建测试实例 $myTest = new myZenTest(); -r($myTest->showWorkCountNotInOpenTest(0, 10, 1)) && p('') && e('0'); // 查看各个模块的数量 -r($myTest->showWorkCountNotInOpenTest(10, 20, 1)) && p('') && e('0'); // 查看各个模块的数量 -r($myTest->showWorkCountNotInOpenTest(15, 30, 1)) && p('') && e('0'); // 查看各个模块的数量 -r($myTest->showWorkCountNotInOpenTest(20, 40, 1)) && p('') && e('0'); // 查看各个模块的数量 -r($myTest->showWorkCountNotInOpenTest(25, 50, 1)) && p('') && e('0'); // 查看各个模块的数量 \ No newline at end of file +$count = array ('task' => 0, 'story' => 0, 'bug' => 0, 'case' => 0, 'testtask' => 0, 'requirement' => 0, 'epic' => 0, 'issue' => 0, 'risk' => 0, 'reviewissue' => 0, 'qa' => 0, 'meeting' => 0, 'ticket' => 0, 'feedback' => 0); + +r($myTest->showWorkCountNotInOpenTest($count, 0, 10, 1)) && p('feedback') && e('0'); // 查看各个模块的数量 +r($myTest->showWorkCountNotInOpenTest($count, 10, 20, 1)) && p('feedback') && e('0'); // 查看各个模块的数量 +r($myTest->showWorkCountNotInOpenTest($count, 15, 30, 1)) && p('feedback') && e('0'); // 查看各个模块的数量 +r($myTest->showWorkCountNotInOpenTest($count, 20, 40, 1)) && p('feedback') && e('0'); // 查看各个模块的数量 +r($myTest->showWorkCountNotInOpenTest($count, 25, 50, 1)) && p('feedback') && e('0'); // 查看各个模块的数量 \ No newline at end of file