diff --git a/module/bug/test/bug.class.php b/module/bug/test/bug.class.php index ef61c0ebd6..020dfbfdf6 100644 --- a/module/bug/test/bug.class.php +++ b/module/bug/test/bug.class.php @@ -165,39 +165,6 @@ class bugTest } } - /** - * Test get all bugs. - * - * @param string $productIDList - * @param string $moduleIDList - * @access public - * @return string - */ - public function getAllBugsTest($productIDList, $moduleIDList) - { - global $tester; - $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); - - $bugs = $this->objectModel->getAllBugs($productIDList, 'all', $moduleIDList, $executions, 'id_desc'); - - $title = ''; - foreach($bugs as $bug) - { - $title .= ',' . $bug->title; - } - $title = trim($title, ','); - $title = str_replace("'", '', $title); - - if(dao::isError()) - { - return dao::getError(); - } - else - { - return $title; - } - } - /** * Test get by Sonarqube id. * diff --git a/module/bug/test/model/getallbugs.php b/module/bug/test/model/getallbugs.php deleted file mode 100755 index 463e5033fd..0000000000 --- a/module/bug/test/model/getallbugs.php +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env php -getAllBugs(); -cid=1 -pid=1 - -查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 -查询产品1 3与模块1821, 1825下的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下的bug >> 0 - -*/ - -$productIDList = array('1,2,3,1000001', '1,3', '1000001'); -$moduleIDList = array('1821,1825,1831,1000001', '1821, 1825', '1000001'); - -$bug=new bugTest(); - -r($bug->getAllBugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug -r($bug->getAllBugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug -r($bug->getAllBugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug -r($bug->getAllBugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug -r($bug->getAllBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下的bug -r($bug->getAllBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下的bug -r($bug->getAllBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug -r($bug->getAllBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下的bug -r($bug->getAllBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug \ No newline at end of file