diff --git a/module/upgrade/test/lib/upgrade.unittest.class.php b/module/upgrade/test/lib/upgrade.unittest.class.php index bc73e7eb5b..c33100aac8 100755 --- a/module/upgrade/test/lib/upgrade.unittest.class.php +++ b/module/upgrade/test/lib/upgrade.unittest.class.php @@ -817,4 +817,18 @@ class upgradeTest $tableInfo = $this->objectModel->dbh->query("SHOW TABLE STATUS LIKE '$tableName'")->fetch(); return $tableInfo->Collation; } + + /** + * 修改执行模块工作流动作名称 + * Fix workflow action and field name for execution. + * + * @param string $action + * @access public + * @return bool + */ + public function fixWorkflowNameForExecutionTest(string $action) + { + $this->objectModel->fixWorkflowNameForExecution(); + return $this->objectModel->dao->select('name')->from(TABLE_WORKFLOWACTION)->where('module')->eq('execution')->andWhere('action')->eq($action)->fetch('name'); + } } diff --git a/module/upgrade/test/model/fixworkflownameforexecution.php b/module/upgrade/test/model/fixworkflownameforexecution.php new file mode 100644 index 0000000000..8089686ff2 --- /dev/null +++ b/module/upgrade/test/model/fixworkflownameforexecution.php @@ -0,0 +1,44 @@ +#!/usr/bin/env php +fixWorkflowNameForExecution(); +cid=1 + +- 更新执行列表名 @执行列表 +- 更新添加执行名 @添加迭代 +- 更新删除迭代名 @删除迭代 +- 更新设置迭代名 @设置迭代 +- 更新执行概况名 @执行概况 +- 更新编辑名 @编辑 + +**/ + +include dirname(__FILE__, 5) . '/test/lib/init.php'; +include dirname(__FILE__, 2) . '/lib/upgrade.unittest.class.php'; + +$upgrade = new upgradeTest(); + +$workflowaction = zenData('workflowaction'); +$workflowaction->id->range('1-10'); +$workflowaction->module->range('execution'); +$workflowaction->action->range('all,create,delete,edit,view,batchedit'); +$workflowaction->method->range('browse,create,delete,edit,view,batchoperate'); +$workflowaction->type->range('single'); +$workflowaction->batchMode->range('different'); +$workflowaction->position->range('view'); +$workflowaction->show->range('direct'); +$workflowaction->order->range('0'); +$workflowaction->buildin->range('1'); +$workflowaction->createdDate->range('`2025-06-11 10:00:00`'); +$workflowaction->editedDate->range('`2025-06-11 10:30:00`'); +$workflowaction->gen(6); + +r($upgrade->fixWorkflowNameForExecutionTest('all')) && p('') && e('执行列表'); //更新执行列表名 +r($upgrade->fixWorkflowNameForExecutionTest('create')) && p('') && e('添加迭代'); //更新添加执行名 +r($upgrade->fixWorkflowNameForExecutionTest('delete')) && p('') && e('删除迭代'); //更新删除迭代名 +r($upgrade->fixWorkflowNameForExecutionTest('edit')) && p('') && e('设置迭代'); //更新设置迭代名 +r($upgrade->fixWorkflowNameForExecutionTest('view')) && p('') && e('执行概况'); //更新执行概况名 +r($upgrade->fixWorkflowNameForExecutionTest('batchedit')) && p('') && e('编辑'); //更新编辑名