* Refactor testcase::confirmChange.

This commit is contained in:
liumengyi
2023-08-29 15:14:06 +08:00
parent d2a9a821d6
commit ee85fc63fb
+4 -3
View File
@@ -816,19 +816,20 @@ class testcase extends control
}
/**
* 确认用例变更。
* Confirm testcase changed.
*
* @param int $caseID
* @param int $taskID
* @param string $from
* @param string $from view|list
* @access public
* @return void
*/
public function confirmChange($caseID, $taskID = 0, $from = 'view')
public function confirmChange(int $caseID, int $taskID = 0, string $from = 'view')
{
$case = $this->testcase->getById($caseID);
$this->dao->update(TABLE_TESTRUN)->set('version')->eq($case->version)->where('`case`')->eq($caseID)->exec();
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $from == 'view' ? inlink('view', "caseID=$caseID&version=$case->version&from=testtask&taskID=$taskID") : true));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $from == 'view' ? inlink('view', "caseID={$caseID}&version={$case->version}&from=testtask&taskID={$taskID}") : true));
}
/**