* Add task::buildtaskforupdateeffort unit test.
This commit is contained in:
@@ -1509,6 +1509,27 @@ class taskTest
|
||||
return $this->objectModel->buildTaskForEffort($record, $task, $lastDate, $isFinishTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试通过编辑日志修改任务信息的方法。
|
||||
* Test the method for update task information by updating the effort.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @param int $effortID
|
||||
* @param object $param
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function buildTaskForUpdateEffortTest(int $taskID, int $effortID, object $param): object
|
||||
{
|
||||
$task = $this->objectModel->getByID($taskID);
|
||||
$oldEffort = $this->objectModel->getEffortByID($effortID);
|
||||
|
||||
$effort = clone $oldEffort;
|
||||
foreach($param as $key => $value) $effort->{$key} = $value;
|
||||
|
||||
return $this->objectModel->buildTaskForUpdateEffort($task, $oldEffort, $effort);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the assignedTo for the multiply linear task.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user