Files
EasySoft-ZenTaoPMS/module/my/test/model/getoverview.php
T
2024-03-19 17:13:53 +08:00

41 lines
1.0 KiB
PHP
Executable File

#!/usr/bin/env php
<?php
declare(strict_types=1);
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/my.class.php';
zdTable('project')->config('program')->gen('20');
zdTable('usergroup')->gen('10');
zdTable('group')->gen('10');
zdTable('bug')->gen('20');
zdTable('task')->gen('20');
zdTable('story')->gen('20');
zdTable('effort')->gen('1');
zdTable('user')->gen('1');
su('admin');
global $tester;
$tester->loadModel('program')->refreshStats(true);
/**
title=测试 myModel->getOverview();
cid=1
pid=1
projectTotal数据获取 >> 4
allConsumed数据获取 >> 33
thisYearConsumed数据获取 >> 1
*/
$my = new myTest();
$projectTotal = $my->getOverviewTest()->projectTotal;
$allConsumed = $my->getOverviewTest()->allConsumed;
$thisYearConsumed = $my->getOverviewTest()->thisYearConsumed;
r($projectTotal) && p() && e('4'); // projectTotal数据获取
r($allConsumed) && p() && e('33'); // allConsumed数据获取
r($thisYearConsumed) && p() && e('1'); // thisYearConsumed数据获取