* Add switchDB by tests.

This commit is contained in:
liyang
2022-08-09 14:11:38 +08:00
parent 40ba4c8a9e
commit 3bd5ccc13f
881 changed files with 3058 additions and 1826 deletions
+10 -10
View File
@@ -2,6 +2,7 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
$db->switchDB();
su('admin');
/**
@@ -11,17 +12,17 @@ cid=1
pid=1
修改分支为主干 未发生变化 >> 0
修改分支为分支11 >> branch,0,11
修改分支为分支12 >> branch,11,12
修改分支为分支11 >> branch,0,11
修改分支为分支12 >> branch,11,12
修改分支为主干 未发生变化 >> 0
修改分支为分支9 >> branch,0,9
修改分支为分支10 >> branch,9,10
修改分支为分支9 >> branch,0,9
修改分支为分支10 >> branch,9,10
修改分支为主干 未发生变化 >> 0
修改分支为分支7 >> branch,0,7
修改分支为分支8 >> branch,7,8
修改分支为分支7 >> branch,0,7
修改分支为分支8 >> branch,7,8
修改分支为主干 未发生变化 >> 0
修改分支为分支37 >> branch,0,37
修改分支为分支38 >> branch,37,38
修改分支为分支37 >> branch,0,37
修改分支为分支38 >> branch,37,38
*/
@@ -35,7 +36,6 @@ $branchList2 = array('0', '9', '10');
$branchList3 = array('0', '7', '8');
$branchList4 = array('0', '37', '38');
$bug = new bugTest();
r($bug->batchChangeBranchTest($bugIDList1, $branchList1[0], $bugIDList1[0])) && p() && e('0'); // 修改分支为主干 未发生变化
r($bug->batchChangeBranchTest($bugIDList1, $branchList1[1], $bugIDList1[1])) && p('0:field,old,new') && e('branch,0,11'); // 修改分支为分支11
@@ -49,4 +49,4 @@ r($bug->batchChangeBranchTest($bugIDList3, $branchList3[2], $bugIDList3[2])) &&
r($bug->batchChangeBranchTest($bugIDList4, $branchList4[0], $bugIDList4[0])) && p() && e('0'); // 修改分支为主干 未发生变化
r($bug->batchChangeBranchTest($bugIDList4, $branchList4[1], $bugIDList4[1])) && p('0:field,old,new') && e('branch,0,37'); // 修改分支为分支37
r($bug->batchChangeBranchTest($bugIDList4, $branchList4[2], $bugIDList4[2])) && p('0:field,old,new') && e('branch,37,38'); // 修改分支为分支38
system("./ztest init");
$db->restoreDB();