* Refactor getProjectStats method.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<?php
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
zdTable('project')->gen(50);
|
||||
|
||||
$task = zdTable('task');
|
||||
@@ -10,9 +13,9 @@ $task->gen(100);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 programModel::create();
|
||||
title=测试 programModel::computeProjectHours();
|
||||
timeout=0
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
@@ -25,7 +28,5 @@ $tasks = $tester->program->dao->select('id, project, estimate, consumed, `left`,
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchGroup('project', 'id');
|
||||
|
||||
$hours = $tester->program->computeProjectHours($tasks);
|
||||
|
||||
r($tester->program->computeProjectHours(array())) && p() && e('0');
|
||||
r($tester->program->computeProjectHours(array())) && p() && e('0');
|
||||
r($tester->program->computeProjectHours($tasks)) && p('11:totalConsumed,totalEstimate,totalLeft,progress') && e('15,30,10,60');
|
||||
|
||||
Reference in New Issue
Block a user