diff --git a/module/tutorial/test/lib/tutorial.unittest.class.php b/module/tutorial/test/lib/tutorial.unittest.class.php index a4dbc01ed3..71bf7978a7 100644 --- a/module/tutorial/test/lib/tutorial.unittest.class.php +++ b/module/tutorial/test/lib/tutorial.unittest.class.php @@ -631,4 +631,19 @@ class tutorialTest return $result; } + + /** + * 测试获取新手模式Bug。 + * Test get bug. + * + * @access public + * @return object + */ + public function getBugTest(): object + { + $result = $this->objectModel->getBug(); + if(dao::isError()) return dao::getError(); + + return $result; + } } diff --git a/module/tutorial/test/model/getbug.php b/module/tutorial/test/model/getbug.php new file mode 100755 index 0000000000..84c88b6c2d --- /dev/null +++ b/module/tutorial/test/model/getbug.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getBugTest()) && p('id') && e('1'); // 步骤1:验证Bug对象ID +r($tutorialTest->getBugTest()) && p('title') && e('Test bug-active'); // 步骤2:验证Bug对象标题 +r($tutorialTest->getBugTest()) && p('status') && e('active'); // 步骤3:验证Bug对象状态 +r($tutorialTest->getBugTest()) && p('type') && e('codeerror'); // 步骤4:验证Bug对象类型 +r($tutorialTest->getBugTest()) && p('project') && e('2'); // 步骤5:验证Bug对象项目ID \ No newline at end of file