From 08fb2bec460ac095d8ae506053c73252ecc8083f Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 19 Jun 2025 05:56:48 +0000 Subject: [PATCH] * [unittest] modify unittest. --- module/action/test/lib/action.unittest.class.php | 2 +- module/action/test/model/renderchanges.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/action/test/lib/action.unittest.class.php b/module/action/test/lib/action.unittest.class.php index 99eee273eb..9a2b409533 100644 --- a/module/action/test/lib/action.unittest.class.php +++ b/module/action/test/lib/action.unittest.class.php @@ -828,7 +828,7 @@ class actionTest public function renderChangesTest(string $objectType, int $historyID = 0): string { $histories = $this->objectModel->dao->select('*')->from(TABLE_HISTORY)->where('id')->eq($historyID)->fetchAll('id', false); - $content = $this->objectModel->renderChanges($objectType, $histories, true); + $content = $this->objectModel->renderChanges($objectType, 0, $histories); $content = str_replace("\n", '', $content); return $content; } diff --git a/module/action/test/model/renderchanges.php b/module/action/test/model/renderchanges.php index d123eb91c1..ca65a4fb68 100755 --- a/module/action/test/model/renderchanges.php +++ b/module/action/test/model/renderchanges.php @@ -33,4 +33,4 @@ r($action->renderChangesTest('')) && p('') && e('0'); // 测试type为 r($action->renderChangesTest('bug', 1)) && p('') && e('修改了 解决方案,旧值为 "oldValue",新值为 "newValue"。
'); // 测试bug解决方案历史记录 r($action->renderChangesTest('bug', 2)) && p('') && e('修改了 解决版本,旧值为 "oldValue",新值为 "newValue"。
'); // 测试bug解决版本历史记录 r($action->renderChangesTest('bug', 3)) && p('') && e('修改了 解决日期,旧值为 "oldValue",新值为 "newValue"。
'); // 测试bug解决日期历史记录 -r($action->renderChangesTest('product', 4)) && p('') && e('修改了 状态,旧值为 "oldValue",新值为 "newValue"。
'); // 测试产品状态历史记录 +r($action->renderChangesTest('product', 4)) && p('') && e('修改了 状态,旧值为 "oldValue",新值为 "newValue"。
'); // 测试产品状态历史记录 \ No newline at end of file