* Add case of execution model.

This commit is contained in:
田淑杰
2023-01-12 09:10:36 +08:00
parent d97b6a1105
commit f639a027dd
2 changed files with 85 additions and 0 deletions
+34
View File
@@ -13,6 +13,40 @@ class executionTest
$this->objectModel = $tester->loadModel('execution');
}
/**
* Set Kanban.
*
* @param int $executionID
* @param array $param
* @access public
* @return object
*/
public function setKanbanTest($executionID, $param = array())
{
global $tester;
$tester->loadModel('kanban');
$object = $tester->dbh->query("SELECT `displayCards`,`fluidBoard`,`colWidth`,`minColWidth`,`maxColWidth` FROM zt_project WHERE id = $executionID ")->fetch();
$_POST['heightType'] = 'auto';
foreach($object as $field => $defaultValue) $_POST[$field] = $defaultValue;
foreach($param as $key => $value) $_POST[$key] = $value;
$this->objectModel->setKanban($executionID);
$execution = $this->objectModel->getByID($executionID);
unset($_POST);
if(dao::isError())
{
return dao::getError();
}
else
{
return $execution;
}
}
/**
* Set project into session.
*