* Add task::buildtaskforupdateeffort unit test.

This commit is contained in:
sunguangming
2023-06-05 15:22:57 +08:00
parent 9de92404d3
commit f450d6c0ba
3 changed files with 128 additions and 1 deletions
+21
View File
@@ -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.
*