diff --git a/module/tutorial/test/lib/tutorial.unittest.class.php b/module/tutorial/test/lib/tutorial.unittest.class.php index fc8bb6a8de..97b37addca 100644 --- a/module/tutorial/test/lib/tutorial.unittest.class.php +++ b/module/tutorial/test/lib/tutorial.unittest.class.php @@ -796,4 +796,19 @@ class tutorialTest return $result; } + + /** + * 测试获取新手模式看板组。 + * Test get groups. + * + * @access public + * @return array + */ + public function getGroupsTest(): array + { + $result = $this->objectModel->getGroups(); + if(dao::isError()) return dao::getError(); + + return $result; + } } diff --git a/module/tutorial/test/model/getgroups.php b/module/tutorial/test/model/getgroups.php new file mode 100755 index 0000000000..4fe0512347 --- /dev/null +++ b/module/tutorial/test/model/getgroups.php @@ -0,0 +1,33 @@ +#!/usr/bin/env php +getGroupsTest())) && p() && e('1'); // 步骤1:验证返回结果类型为数组 +r(count($tutorialTest->getGroupsTest()[1])) && p() && e('3'); // 步骤2:验证区域1包含3个组 +r(isset($tutorialTest->getGroupsTest()[1][1])) && p() && e('1'); // 步骤3:验证存在第一个组 +r($tutorialTest->getGroupsTest()[1][1]->id == 1) && p() && e('1'); // 步骤4:验证第一个组ID为1 +r($tutorialTest->getGroupsTest()[1][3]->order == 3) && p() && e('1'); // 步骤5:验证第三个组order为3 \ No newline at end of file