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

29 lines
857 B
PHP
Executable File

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