* 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
+6 -6
View File
@@ -2,6 +2,7 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
$db->switchDB();
/**
@@ -9,16 +10,15 @@ title=bugModel->activate();
cid=1
pid=1
测试激活状态为active的bug1 >> activatedCount,0,1
测试激活状态为active的bug2 >> activatedCount,0,1
测试激活状态为active的bug1 >> activatedCount,0,1
测试激活状态为active的bug2 >> activatedCount,0,1
测试激活状态为resolved的bug51 >> assignedTo,dev1,admin;activatedCount,0,1
测试激活状态为resolved的bug52 >> assignedTo,dev1,admin;activatedCount,0,1
测试激活状态为closed的bug81 >> assignedTo,test1,admin;activatedCount,0,1
测试激活状态为closed的bug82 >> assignedTo,test1,admin;activatedCount,0,1
测试激活状态为closed的bug81 >> assignedTo,test1,admin;activatedCount,0,1
测试激活状态为closed的bug82 >> assignedTo,test1,admin;activatedCount,0,1
*/
$bugIDList = array('1', '2', '51', '52', '81', '82');
$bug=new bugTest();
@@ -28,4 +28,4 @@ r($bug->activateObject($bugIDList[2])) && p('0:field,old,new;2:field,old,new') &
r($bug->activateObject($bugIDList[3])) && p('0:field,old,new;2:field,old,new') && e('assignedTo,dev1,admin;activatedCount,0,1'); // 测试激活状态为resolved的bug52
r($bug->activateObject($bugIDList[4])) && p('0:field,old,new;2:field,old,new') && e('assignedTo,test1,admin;activatedCount,0,1'); // 测试激活状态为closed的bug81
r($bug->activateObject($bugIDList[5])) && p('0:field,old,new;2:field,old,new') && e('assignedTo,test1,admin;activatedCount,0,1'); // 测试激活状态为closed的bug82
system("./ztest init");
$db->restoreDB();