Files
EasySoft-ZenTaoPMS/module/story/test/model/getdataofstorysperchange.php
T
2023-10-13 16:22:19 +08:00

29 lines
846 B
PHP
Executable File

#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
su('admin');
$story = zdTable('story');
$story->version->range('1-4');
$story->gen(20);
$_SESSION['storyOnlyCondition'] = true;
$_SESSION['storyQueryCondition'] = "`id` < 20";
/**
title=测试 storyModel->getDataOfStoriesPerChange();
cid=1
pid=1
*/
global $tester;
$tester->loadModel('story');
$data = $tester->story->getDataOfStoriesPerChange();
r(count($data)) && p() && e('4'); // 按照需求版本号分组,获取分组后的需求数量
r($data) && p('1:name,value') && e('0,5'); // 按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据
r($data) && p('2:name,value') && e('1,5'); // 按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据