diff --git a/module/bug/test/bug.class.php b/module/bug/test/bug.class.php index 6031c3439f..0b03014dd4 100644 --- a/module/bug/test/bug.class.php +++ b/module/bug/test/bug.class.php @@ -394,40 +394,6 @@ class bugTest } } - - /** - * Test get bugs the status is active or unclosed. - * - * @param string $productIDList - * @param string $modules - * @access public - * @return string - */ - public function getByStatusTest($productIDList, $modules, $status) - { - global $tester; - $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); - - $bugs = $this->objectModel->getByStatus($productIDList, 'all', $modules, $executions, $status, 'id_desc', null, 0); - - $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/getbystatus.php b/module/bug/test/model/getbystatus.php deleted file mode 100755 index adbcb3487a..0000000000 --- a/module/bug/test/model/getbystatus.php +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env php -getByStatus(); -cid=1 -pid=1 - -查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> bug8,BUG1 -查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> bug8,BUG1 -查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> BUG1 -查询产品1 3 不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> BUG1 -查询产品1 3 不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> BUG1 -查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> BUG1 -查询产品1 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询产品1 与模块1821状态为unclosed下未确认的bug >> BUG1 -查询产品1 与模块1821状态为unresolved下未确认的bug >> BUG1 -查询产品1 与模块1821状态为toclosed下未确认的bug >> 0 -查询产品1 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询产品1 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询产品1 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> 0 -查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 - -*/ - -$productIDList = array('1,3,1000001', '1', '1000001'); -$moduleIDList = array('1821,1832,1000001', '1821', '1000001', '0'); -$statusList = array('unclosed', 'unresolved', 'toclosed'); - -$bug=new bugTest(); - -r($bug->getByStatusTest($productIDList[0], $moduleIDList[0], $statusList[0])) && p('title') && e('bug8,BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[0], $statusList[1])) && p('title') && e('bug8,BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[0], $statusList[2])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[1], $statusList[0])) && p('title') && e('BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[1], $statusList[1])) && p('title') && e('BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与模块1821状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[0], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[0], $statusList[0])) && p('title') && e('BUG1'); // 查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[0], $statusList[1])) && p('title') && e('BUG1'); // 查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[0], $statusList[2])) && p('title') && e('0'); // 查询产品1 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[1], $statusList[0])) && p('title') && e('BUG1'); // 查询产品1 与模块1821状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[1], $statusList[1])) && p('title') && e('BUG1'); // 查询产品1 与模块1821状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询产品1 与模块1821状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询产品1 与不存在的模块1000001 状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询产品1 与不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[1], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询产品1 与不存在的模块1000001 状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[0], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[0], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[0], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug \ No newline at end of file