diff --git a/module/tutorial/test/lib/tutorial.unittest.class.php b/module/tutorial/test/lib/tutorial.unittest.class.php index 02b8fbda84..ce0818f1fa 100644 --- a/module/tutorial/test/lib/tutorial.unittest.class.php +++ b/module/tutorial/test/lib/tutorial.unittest.class.php @@ -856,4 +856,19 @@ class tutorialTest return $result; } + + /** + * 测试获取新手模式看板卡片组。 + * Test get card group. + * + * @access public + * @return array + */ + public function getCardGroupTest(): array + { + $result = $this->objectModel->getCardGroup(); + if(dao::isError()) return dao::getError(); + + return $result; + } } diff --git a/module/tutorial/test/model/getcardgroup.php b/module/tutorial/test/model/getcardgroup.php new file mode 100755 index 0000000000..8329119d2c --- /dev/null +++ b/module/tutorial/test/model/getcardgroup.php @@ -0,0 +1,34 @@ +#!/usr/bin/env php +getCardGroupTest(); +r(count($cardGroupResult)) && p() && e('3'); // 步骤1:正常获取卡片组,验证返回数组的顶级键数量 +r($cardGroupResult[1][1][1][0]['cardType']) && p() && e('story'); // 步骤2:验证story卡片类型 +r($cardGroupResult[2][2][16][0]['cardType']) && p() && e('task'); // 步骤3:验证task卡片类型 +r($cardGroupResult[3][3][23][0]['cardType']) && p() && e('bug'); // 步骤4:验证bug卡片类型 +r($cardGroupResult[1][1][1][0]['title']) && p() && e('Test story'); // 步骤5:验证story卡片标题 \ No newline at end of file