diff --git a/test/model/execution/unlinkcases.php b/test/model/execution/unlinkcases.php index 5a5eabf153..23bc2feee7 100755 --- a/test/model/execution/unlinkcases.php +++ b/test/model/execution/unlinkcases.php @@ -2,7 +2,40 @@ switchDB(); + +$execution = zdTable('project'); +$execution->id->range('1-5'); +$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3'); +$execution->type->range('project{2},sprint,waterfall,kanban'); +$execution->status->range('doing{3},closed,doing'); +$execution->parent->range('0,0,1,1,2'); +$execution->grade->range('2{2},1{3}'); +$execution->path->range('1,2,`1,3`,`1,4`,`2,5`')->prefix(',')->postfix(','); +$execution->begin->range('20230102 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->end->range('20230212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->gen(5); + +$projectstory = zdTable('projectcase'); +$projectstory->project->range('3-5'); +$projectstory->product->range('1,43,68'); +$projectstory->case->range('4,324,364'); +$projectstory->gen(3); + +$product = zdTable('product'); +$product->id->range('1,43,68'); +$product->name->range('1-3')->prefix('产品'); +$product->code->range('1-3')->prefix('product'); +$product->type->range('normal'); +$product->status->range('normal'); +$product->gen(3); + +$stroy = zdTable('story'); +$stroy->id->range('2,170,270'); +$stroy->title->range('1-3')->prefix('需求'); +$stroy->type->range('story'); +$stroy->status->range('active'); +$stroy->gen(3); + su('admin'); /** @@ -17,7 +50,7 @@ pid=1 */ -$executionIDList = array('101', '131', '161'); +$executionIDList = array('3', '4', '5'); $products = array('1', '43', '68'); $stories = array('2', '170', '270'); $count = array('0','1'); @@ -26,5 +59,3 @@ $execution = new executionTest(); r($execution->unlinkCasesTest($executionIDList[0], $products[0], $stories[0])) && p() && e('0'); // 敏捷执行解除关联用例 r($execution->unlinkCasesTest($executionIDList[1], $products[1], $stories[1])) && p() && e('0'); // 瀑布执行解除关联用例 r($execution->unlinkCasesTest($executionIDList[2], $products[2], $stories[2])) && p() && e('0'); // 看板执行解除关联用例 - -$db->restoreDB(); \ No newline at end of file