znt/module/story/test/model/getstoryspecs.php

32 lines
1.2 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 storyModel->getStorySpecs();
timeout=0
cid=18561
- 根据传入的需求ID列表获取最新版本的需求描述信息
- 第1条的spec属性 @这是一个软件需求描述1
- 第1条的story属性 @1
- 根据传入的需求ID列表获取最新版本的验收标准信息
- 第15条的verify属性 @这是一个需求验收15
- 第15条的story属性 @15
- 传入三个需求ID判断获取到的需求描述信息数量 @2
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
zenData('storyspec')->gen(50);
$story = new storyModelTest();
$storyIdList = array(1, 15, 100);
$storyspecs = $story->getStorySpecsTest($storyIdList);
r($storyspecs) && p('1:spec,story') && e('这是一个软件需求描述1,1'); //根据传入的需求ID列表获取最新版本的需求描述信息
r($storyspecs) && p('15:verify,story') && e('这是一个需求验收15,15'); //根据传入的需求ID列表获取最新版本的验收标准信息
r(count($storyspecs)) && p() && e('2'); //传入三个需求ID判断获取到的需求描述信息数量