* 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 未发生变化 >> 0
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为0 未发生变化 >> 0
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为0 未发生变化 >> 0
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为0 未发生变化 >> 0
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
修改计划为计划1 >> plan,0,1
修改计划为计划2 >> plan,1,2
*/
@@ -32,7 +33,6 @@ $bugIDList4 = array('175', '176', '177');
$planList = array('0', '1', '2');
$bug = new bugTest();
r($bug->batchChangePlanTest($bugIDList1, $planList[0], $bugIDList1[0])) && p() && e('0'); // 修改计划为0 未发生变化
r($bug->batchChangePlanTest($bugIDList1, $planList[1], $bugIDList1[1])) && p('0:field,old,new') && e('plan,0,1'); // 修改计划为计划1
@@ -46,4 +46,4 @@ r($bug->batchChangePlanTest($bugIDList3, $planList[2], $bugIDList3[2])) && p('0:
r($bug->batchChangePlanTest($bugIDList4, $planList[0], $bugIDList4[0])) && p() && e('0'); // 修改计划为0 未发生变化
r($bug->batchChangePlanTest($bugIDList4, $planList[1], $bugIDList4[1])) && p('0:field,old,new') && e('plan,0,1'); // 修改计划为计划1
r($bug->batchChangePlanTest($bugIDList4, $planList[2], $bugIDList4[2])) && p('0:field,old,new') && e('plan,1,2'); // 修改计划为计划2
system("./ztest init");
$db->restoreDB();