diff --git a/module/tutorial/test/lib/tutorial.unittest.class.php b/module/tutorial/test/lib/tutorial.unittest.class.php index 94f31eaba0..aec524b1b0 100644 --- a/module/tutorial/test/lib/tutorial.unittest.class.php +++ b/module/tutorial/test/lib/tutorial.unittest.class.php @@ -284,4 +284,19 @@ class tutorialTest return $result; } + + /** + * 测试获取新手模式研发需求。 + * Test get tutorial story. + * + * @access public + * @return object + */ + public function getStoryTest(): object + { + $result = $this->objectModel->getStory(); + if(dao::isError()) return dao::getError(); + + return $result; + } } diff --git a/module/tutorial/test/model/getstory.php b/module/tutorial/test/model/getstory.php new file mode 100755 index 0000000000..2e4c94f5e3 --- /dev/null +++ b/module/tutorial/test/model/getstory.php @@ -0,0 +1,35 @@ +#!/usr/bin/env php +getStoryTest()) && p('id') && e('3'); // 步骤1:正常获取研发需求,验证ID +r($tutorialTest->getStoryTest()) && p('title') && e('Test active story'); // 步骤2:验证标题属性 +r($tutorialTest->getStoryTest()) && p('status') && e('active'); // 步骤3:验证状态属性 +r($tutorialTest->getStoryTest()) && p('type') && e('story'); // 步骤4:验证类型属性 +r($tutorialTest->getStoryTest()) && p('pri,estimate') && e('3,1'); // 步骤5:验证优先级和估时属性 \ No newline at end of file