* 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');
/**
@@ -10,15 +11,15 @@ title=测试bugModel->batchResolve();
cid=1
pid=1
解决bug1 2 3,解决方式为bydesign >> resolution,,bydesign;status,active,resolved
解决bug4 5 6,解决方式为duplicate >> resolution,,duplicate;status,active,resolved
解决bug7 8 9,解决方式为external >> resolution,,external;status,active,resolved
解决bug10 11 12,解决方式为fixed >> resolution,,fixed;status,active,resolved
解决bug13 14 15,解决方式为notrepro >> resolution,,notrepro;status,active,resolved
解决bug16 17 18,解决方式为postponed >> resolution,,postponed;status,active,resolved
解决bug1 2 3,解决方式为bydesign >> resolution,,bydesign;status,active,resolved
解决bug4 5 6,解决方式为duplicate >> resolution,,duplicate;status,active,resolved
解决bug7 8 9,解决方式为external >> resolution,,external;status,active,resolved
解决bug10 11 12,解决方式为fixed >> resolution,,fixed;status,active,resolved
解决bug13 14 15,解决方式为notrepro >> resolution,,notrepro;status,active,resolved
解决bug16 17 18,解决方式为postponed >> resolution,,postponed;status,active,resolved
解决bug19 20 21,解决方式为willnotfix >> resolution,,willnotfix;status,active,resolved
解决bug22 23 24,解决方式为tostory >> resolution,,tostory;status,active,resolved
解决bug状态为resolve的bug >> 0
解决bug22 23 24,解决方式为tostory >> resolution,,tostory;status,active,resolved
解决bug状态为resolve的bug >> 0
*/
@@ -33,7 +34,6 @@ $bugIDList8 = array('22', '23', '24');
$resolutionList = array('bydesign', 'duplicate', 'external', 'fixed', 'notrepro', 'postponed', 'willnotfix', 'tostory');
$bug = new bugTest();
r($bug->batchResolveTest($bugIDList1, $resolutionList[0], $bugIDList1[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,bydesign;status,active,resolved'); // 解决bug1 2 3,解决方式为bydesign
r($bug->batchResolveTest($bugIDList2, $resolutionList[1], $bugIDList2[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,duplicate;status,active,resolved'); // 解决bug4 5 6,解决方式为duplicate
@@ -44,4 +44,4 @@ r($bug->batchResolveTest($bugIDList6, $resolutionList[5], $bugIDList6[0])) && p(
r($bug->batchResolveTest($bugIDList7, $resolutionList[6], $bugIDList7[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,willnotfix;status,active,resolved'); // 解决bug19 20 21,解决方式为willnotfix
r($bug->batchResolveTest($bugIDList8, $resolutionList[7], $bugIDList8[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,tostory;status,active,resolved'); // 解决bug22 23 24,解决方式为tostory
r($bug->batchResolveTest($bugIDList8, $resolutionList[7], $bugIDList8[0])) && p('0:field,old,new;3:field,old,new') && e('0'); // 解决bug状态为resolve的bug
system("./ztest init");
$db->restoreDB();