* Add case of model.

This commit is contained in:
田淑杰
2023-01-12 10:02:48 +08:00
parent f639a027dd
commit 7fe4be9942
2 changed files with 75 additions and 0 deletions
+23
View File
@@ -13,6 +13,29 @@ class executionTest
$this->objectModel = $tester->loadModel('execution');
}
/**
* Check the workload format and total.
*
* @param string $executionID
* @param string $type
* @param int $percent
* @access public
* @return object
*/
public function checkWorkloadTest($executionID, $type = '', $percent = 0)
{
global $tester;
$tester->loadModel('programplan');
$_POST['percent'] = $percent;
$oldExecution = empty($executionID) ? '' : $this->objectModel->getByID($executionID);
$this->objectModel->checkWorkload($type, $percent, $oldExecution);
unset($_POST);
if(dao::isError()) return dao::getError();
return true;
}
/**
* Set Kanban.
*