diff --git a/module/action/test/tao/processlinkstoryandbugactionextra.php b/module/action/test/tao/processlinkstoryandbugactionextra.php new file mode 100755 index 0000000000..dc5d5964da --- /dev/null +++ b/module/action/test/tao/processlinkstoryandbugactionextra.php @@ -0,0 +1,33 @@ +#!/usr/bin/env php +processLinkStoryAndBugActionExtraTest('1', 'story', 'view')->extra) > 0) && p() && e('1'); // 步骤1:测试单个需求ID(ID为1) +r(strpos($actionTest->processLinkStoryAndBugActionExtraTest('1,2,3', 'story', 'view')->extra, ',') !== false) && p() && e('1'); // 步骤2:测试多个需求ID(ID为1,2,3) +r(strlen($actionTest->processLinkStoryAndBugActionExtraTest('1', 'bug', 'view')->extra) > 0) && p() && e('1'); // 步骤3:测试单个bug ID(ID为1) +r(strpos($actionTest->processLinkStoryAndBugActionExtraTest('1,2,3', 'bug', 'view')->extra, ',') !== false) && p() && e('1'); // 步骤4:测试多个bug ID(ID为1,2,3) +r(strlen($actionTest->processLinkStoryAndBugActionExtraTest('', 'story', 'view')->extra) > 0) && p() && e('1'); // 步骤5:测试空字符串输入 +r(strlen($actionTest->processLinkStoryAndBugActionExtraTest('999', 'story', 'view')->extra) > 0) && p() && e('1'); // 步骤6:测试不存在的ID(ID为999) +r(strpos($actionTest->processLinkStoryAndBugActionExtraTest('1,999,2', 'story', 'view')->extra, ',') !== false) && p() && e('1'); // 步骤7:测试混合存在和不存在的ID(ID为1,999,2) \ No newline at end of file