* Add switchDB by tests.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/task.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,7 +12,7 @@ cid=1
|
||||
pid=1
|
||||
|
||||
根据taskID计算没有子任务的计划工时 >> 1,0,3,0
|
||||
根据taskID计算有子任务的父任务工时 >> 601,18,30,18
|
||||
根据taskID计算有父任务的子任务工时 >> 601,18,30,18
|
||||
根据不存在的taskID计算工时 >> 0
|
||||
|
||||
*/
|
||||
@@ -22,4 +23,4 @@ $task = new taskTest();
|
||||
r($task->computeWorkingHoursTest($taskIDList[0])) && p('id,estimate,consumed,left') && e('1,0,3,0'); //根据taskID计算没有子任务的计划工时
|
||||
r($task->computeWorkingHoursTest($taskIDList[1])) && p('id,estimate,consumed,left') && e('601,18,30,18'); //根据taskID计算有父任务的子任务工时
|
||||
r($task->computeWorkingHoursTest($taskIDList[2])) && p('id,estimate,consumed,left') && e('0'); //根据不存在的taskID计算工时
|
||||
system("./ztest init");
|
||||
$db->restoreDB();
|
||||
Reference in New Issue
Block a user