From becabaacc58e259f76949a5e950280e7e50fd394 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 24 Sep 2025 11:55:39 +0800 Subject: [PATCH] * [misc] Enhance unit tests for storyModel::getDefaultShowGrades() 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/story/test/model/getdefaultshowgrades.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/story/test/model/getdefaultshowgrades.php b/module/story/test/model/getdefaultshowgrades.php index 186b39be7e..57f5b1a261 100755 --- a/module/story/test/model/getdefaultshowgrades.php +++ b/module/story/test/model/getdefaultshowgrades.php @@ -7,7 +7,7 @@ title=测试 storyModel::getDefaultShowGrades(); timeout=0 cid=0 -- 步骤3:边界值测试空数组 @0 +- 步骤3:边界值测试空数组 @ */ @@ -15,13 +15,13 @@ cid=0 include dirname(__FILE__, 5) . '/test/lib/init.php'; include dirname(__FILE__, 2) . '/lib/story.unittest.class.php'; -// 3. 用户登录(选择合适角色) +// 2. 用户登录(选择合适角色) su('admin'); -// 4. 创建测试实例(变量名与模块名一致) +// 3. 创建测试实例(变量名与模块名一致) $storyTest = new storyTest(); -// 5. 🔴 强制要求:必须包含至少5个测试步骤 +// 4. 强制要求:必须包含至少5个测试步骤 r($storyTest->getDefaultShowGradesTest(array( array('items' => array( array('value' => 'story'), @@ -40,11 +40,11 @@ r($storyTest->getDefaultShowGradesTest(array( )) ))) && p() && e('story,requirement,epic,feature,'); // 步骤2:正常情况测试多级菜单 -r($storyTest->getDefaultShowGradesTest(array())) && p() && e('0'); // 步骤3:边界值测试空数组 +r($storyTest->getDefaultShowGradesTest(array())) && p() && e(''); // 步骤3:边界值测试空数组 r($storyTest->getDefaultShowGradesTest(array( array('items' => array()) -))) && p() && e('0'); // 步骤4:边界值测试空items数组 +))) && p() && e(''); // 步骤4:边界值测试空items数组 r($storyTest->getDefaultShowGradesTest(array( array('items' => array(