From dcf3673e7b9fb63bae3152fb1cb21bb365efb183 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 12 Nov 2025 13:55:31 +0800 Subject: [PATCH] + [misc] Add unit tests for testreportZen::commonAction() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- module/testreport/test/zen/commonaction.php | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 module/testreport/test/zen/commonaction.php diff --git a/module/testreport/test/zen/commonaction.php b/module/testreport/test/zen/commonaction.php new file mode 100755 index 0000000000..f894ff2bc6 --- /dev/null +++ b/module/testreport/test/zen/commonaction.php @@ -0,0 +1,36 @@ +#!/usr/bin/env php +commonActionTest(1, 'product')) && p() && e('1'); // 步骤1:objectType为product且objectID为1的正常情况 +r($testreportTest->commonActionTest(2, 'execution')) && p() && e('2'); // 步骤2:objectType为execution且objectID为2的正常情况 +r($testreportTest->commonActionTest(3, 'project')) && p() && e('3'); // 步骤3:objectType为project且objectID为3的正常情况 +r($testreportTest->commonActionTest(0, 'product')) && p() && e('1'); // 步骤4:objectType为product且objectID为0时返回默认产品ID +r($testreportTest->commonActionTest(0, 'execution')) && p() && e('0'); // 步骤5:objectType为execution且objectID为0时返回默认执行ID \ No newline at end of file