From 3dbb922c769288a35d8272028473a7ec39d90c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B7=91=E6=9D=B0?= Date: Tue, 10 Jan 2023 15:41:39 +0800 Subject: [PATCH] * Add case of execution model. --- test/model/execution/getchildexecutions.php | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/test/model/execution/getchildexecutions.php b/test/model/execution/getchildexecutions.php index 8de2d620ef..834a7a5e3c 100755 --- a/test/model/execution/getchildexecutions.php +++ b/test/model/execution/getchildexecutions.php @@ -2,8 +2,20 @@ gen(5); su('admin'); +$execution = zdTable('project'); +$execution->id->range('1-5'); +$execution->name->range('项目集1,项目1,父阶段1,子阶段1,子阶段2'); +$execution->type->range('program,project,stage{3}'); +$execution->parent->range('0,1,0,3{2}'); +$execution->status->range('wait'); +$execution->openedBy->range('admin,user1'); +$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->gen(5); + /** title=测试executionModel->getChildExecutionsTest(); @@ -11,13 +23,13 @@ cid=1 pid=1 查询子阶段 >> 子阶段1 -查询子阶段数量 >> 1 +查询子阶段数量 >> 2 */ -$executionID = '131'; +$executionID = 3; $count = array('0','1'); -$execution = new executionTest(); -r($execution->getChildExecutionsTest($executionID, $count[0])) && p('701:name') && e('子阶段1'); // 查询子阶段 -r($execution->getChildExecutionsTest($executionID, $count[1])) && p() && e('1'); // 查询子阶段数量 +$executionTester = new executionTest(); +r($executionTester->getChildExecutionsTest($executionID, $count[0])) && p('4:name') && e('子阶段1'); // 查询子阶段 +r($executionTester->getChildExecutionsTest($executionID, $count[1])) && p() && e('2'); // 查询子阶段数量