diff --git a/db/update16.4.sql b/db/update16.4.sql index b807f73ccc..e6ac4d5f6e 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -60,4 +60,3 @@ INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'defaultCurrency', 'CNY'); ALTER TABLE `zt_apistruct` CHANGE `desc` `desc` text COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `type`; -ALTER TABLE `zt_review` ADD `doc` mediumint NULL AFTER `template`; diff --git a/test/class/bug.class.php b/test/class/bug.class.php index fb0bf4dc0f..70ec0f7e77 100644 --- a/test/class/bug.class.php +++ b/test/class/bug.class.php @@ -46,6 +46,14 @@ class bugTest } } + /** + * Test batch create bugs. + * + * @param int $productID + * @param array $param + * @access public + * @return object + */ public function batchCreateObject($productID, $param = array()) { $modules = array('0', '0', '0'); @@ -108,7 +116,7 @@ class bugTest * @param array $bug * @param int $executionID * @access public - * @return int + * @return object|int */ public function createBugFromGitlabIssueTest($bug, $executionID) { @@ -129,7 +137,7 @@ class bugTest * Test get bugs. * * @access public - * @return int + * @return string */ public function getBugsTest($product, $branch, $browseType, $module) { @@ -149,6 +157,463 @@ class bugTest $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 check delay bug. + * + * @param object $bug + * @param string $status + * @access public + * @return object + */ + public function checkDelayBugTest($bug, $status) + { + $bug->status = $status; + $bug->deadline = $bug->deadline ? date('Y-m-d',strtotime("$bug->deadline day")) : '0000-00-00'; + $bug->resolvedDate = $bug->resolvedDate ? date('Y-m-d',strtotime("$bug->resolvedDate day")) : '0000-00-00'; + + $object = $this->objectModel->checkDelayBug($bug); + if(!isset($object->delay)) $object->delay = 0; + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + /** + * Test check delay bugs. + * + * @param string $productIDList + * @access public + * @return string + */ + public function checkDelayedBugsTest($productID) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + /* Load pager. */ + $tester->app->loadClass('pager', $static = true); + $pager = new pager(0, 20 ,1); + + $bugs = $this->objectModel->getAllBugs($productID, 0, 0, $executions, 'id_asc', $pager, 0); + $bugs = $this->objectModel->checkDelayedBugs($bugs); + + $delay = ''; + foreach($bugs as $bug) + { + $delay .= ',' . (!isset($bug->delay) ? 0 : $bug->delay); + } + $delay = trim($delay, ','); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $delay; + } + } + + /** + * Test get bugs of a module. + * + * @param string $productIDList + * @param string $moduleIDList + * @access public + * @return string + */ + public function getModuleBugsTest($productIDList, $moduleIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getModuleBugs($productIDList, 'all', $moduleIDList, $executions); + + $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 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 bugs of assign to me. + * + * @param string $productIDList + * @param string $moduleIDList + * @access public + * @return string + */ + public function getByAssigntomeTest($productIDList, $moduleIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByAssigntome($productIDList, 'all', $moduleIDList, $executions, '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 bugs of opened by me. + * + * @param string $productIDList + * @param string $moduleIDList + * @access public + * @return string + */ + public function getByOpenedbymeTest($productIDList, $moduleIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByOpenedbyme($productIDList, 'all', $moduleIDList, $executions, '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 bugs of resolved by me. + * + * @param string $productIDList + * @access public + * @return string + */ + public function getByResolvedbymeTest($productIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByResolvedbyme($productIDList, 'all', '0', $executions, '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 bugs of nobody to do. + * + * @param string $productIDList + * @access public + * @return string + */ + public function getByAssigntonullTest($productIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByAssigntonull($productIDList, 'all', '0', $executions, '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 unconfirmed bugs. + * + * @param string $productIDList + * @param string $modules + * @access public + * @return string + */ + public function getUnconfirmedTest($productIDList, $modules) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getUnconfirmed($productIDList, 'all', $modules, $executions, '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 bugs the overdueBugs is active or unclosed. + * + * @param string $productIDList + * @param string $modules + * @access public + * @return string + */ + public function getOverdueBugsTest($productIDList, $modules) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getOverdueBugs($productIDList, 'all', $modules, $executions, '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 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 unclosed bugs for long time. + * + * @param string $productIDList + * @param string $modules + * @access public + * @return string + */ + public function getByLonglifebugsTest($productIDList, $modules) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByLonglifebugs($productIDList, 'all', $modules, $executions, '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 postponed bugs. + * + * @param string $productIDList + * @access public + * @return string + */ + public function getByPostponedbugsTest($productIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByPostponedbugs($productIDList, 'all', '0', $executions, '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 bugs need confirm. + * + * @param string $productIDList + * @access public + * @return string + */ + public function getByNeedconfirmTest($productIDList) + { + global $tester; + $executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete'); + + $bugs = $this->objectModel->getByNeedconfirm($productIDList, 'all', '0', $executions, 'id_desc', null, 0); + + $title = ''; + foreach($bugs as $bug) + { + $title .= ',' . $bug->title; + } + $title = trim($title, ','); + $title = str_replace("'", '', $title); if(dao::isError()) { diff --git a/test/class/execution.class.php b/test/class/execution.class.php index ad0c193582..12e317336a 100644 --- a/test/class/execution.class.php +++ b/test/class/execution.class.php @@ -1263,6 +1263,7 @@ class executionTest public function getTeamSkipTest($taskID, $begin, $end) { global $tester; + $teams = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($taskID)->andWhere('type')->eq('task')->orderBy('order')->fetchAll('account'); $object = $this->objectModel->getTeamSkip($teams, $begin, $end); @@ -1591,8 +1592,12 @@ class executionTest */ public function getBurnDataFlotTest($executionID = 0, $count) { + $date = date("Y-m-d"); $object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left'); + $todayData = array(); + foreach ($object[$date] as $key => $value) $todayData[$key] = $value; + if(dao::isError()) { $error = dao::getError(); @@ -1600,7 +1605,7 @@ class executionTest } elseif($count == "1") { - return count($object); + return sizeof($todayData); } else { diff --git a/test/class/user.class.php b/test/class/user.class.php old mode 100644 new mode 100755 index c74010d5b8..dc5da2b4bf --- a/test/class/user.class.php +++ b/test/class/user.class.php @@ -520,14 +520,8 @@ class userTest { $myObjects = $this->objectModel->getObjects($account, $type, $status, $orderBy); - if(dao::isError()) - { - return dao::getError(); - } - else - { - return $myObjects; - } + if(dao::isError()) return dao::getError(); + return $myObjects; } /** @@ -542,14 +536,8 @@ class userTest { $contacts = $this->objectModel->getContactLists($account, $params); - if(dao::isError()) - { - return dao::getError(); - } - else - { - return $contacts; - } + if(dao::isError()) return dao::getError(); + return $contacts; } /** @@ -597,7 +585,7 @@ class userTest */ public function getContactUserPairsTest($accountList) { - return $this->objectModel->getContactListByID($listID); + return $this->objectModel->getContactUserPairs($accountList); } /** @@ -612,14 +600,8 @@ class userTest { $listID = $this->objectModel->createContactList($listName, $userList); - if(dao::isError()) - { - return dao::getError(); - } - else - { - return $listID; - } + if(dao::isError()) return dao::getError(); + return $this->objectModel->getContactListByID($listID); } /** @@ -635,13 +617,97 @@ class userTest { $this->objectModel->updateContactList($listID, $listName, $userList); - if(dao::isError()) - { - return dao::getError(); - } - else - { - return $this->objectModel->getContactListByID($listID); - } + if(dao::isError()) return dao::getError(); + return $this->objectModel->getContactListByID($listID); + } + + /** + * Test delete a contact list. + * + * @param int $listID + * @access public + * @return void + */ + public function deleteContactListTest($listID) + { + $this->objectModel->deleteContactList($listID); + + if(dao::isError()) return dao::getError(); + return $this->objectModel->getContactListByID($listID); + } + + /** + * Test delete a contact list. + * + * @param object $user + * @access public + * @return void + */ + public function getDataInJSONTest($user) + { + $user = $this->objectModel->getDataInJSON($user); + + if(dao::isError()) return dao::getError(); + return $user; + } + + /** + * Test get weak users. + * + * @access public + * @return void + */ + public function getWeakUsersTest() + { + $users = $this->objectModel->getWeakUsers(); + + if(dao::isError()) return dao::getError(); + return $users; + } + + /** + * Test compute password strength. + * + * @access public + * @return void + */ + public function computePasswordStrengthTest($password) + { + $strength = $this->objectModel->computePasswordStrength($password); + + if(dao::isError()) return dao::getError(); + return $strength; + } + + /** + * Test compute user view. + * + * @param string $account + * @param bool $force + * @access public + * @return void + */ + public function computeUserViewTest($account, $force = false) + { + $userview = $this->objectModel->computeUserView($account, $force); + + if(dao::isError()) return dao::getError(); + return $userview; + } + + /** + * Test get product members. + * + * @param string $account + * @param bool $force + * @access public + * @return void + */ + public function getProductMembersTest($allProducts) + { + $members = $this->objectModel->getProductMembers($allProducts); + + if(dao::isError()) return dao::getError(); + return $members; } } diff --git a/test/data/bug.yaml b/test/data/bug.yaml index b0c1f76e22..c8fabb5ed1 100644 --- a/test/data/bug.yaml +++ b/test/data/bug.yaml @@ -11,13 +11,13 @@ fields: - field: branch range: 0 - field: module - range: 0 + range: 1821-1823,1825-1827,1831-1833,0{1000000} - field: execution range: 101-700{3} - field: plan range: 0 - field: story - range: 0 + range: 2-400:4 - field: storyVersion range: 1 - field: task @@ -57,7 +57,7 @@ fields: - field: color range: [#3da7f5,#75c941,#2dbdb2,#797ec9,#ffaf38,#ff4e3e] - field: confirmed - range: [0,1]:R + range: 0,1 - field: activatedCount range: 0 - field: mailto @@ -77,8 +77,11 @@ fields: type: timestamp format: "YYYY-MM-DD" - field: deadline - range: "(+2w):60" + range: "(-1M)-(+1w):-1D" type: timestamp + prefix: "" + postfix: "" + loop: 0 format: "YYYY-MM-DD" - field: resolvedBy range: []{50},$assignedTo{30},admin{20} @@ -87,7 +90,12 @@ fields: - field: resolvedBuild range: []{55},trunk{15},[]{25},trunk{5} - field: resolvedDate - range: + range: "(+1w)-(-2w):-1D" + type: timestamp + prefix: "" + postfix: "" + loop: 0 + format: "YYYY-MM-DD" - field: closedBy range: []{80},admin{20} - field: closedDate diff --git a/test/data/story.yaml b/test/data/story.yaml index f27bcd379b..e6afab3695 100644 --- a/test/data/story.yaml +++ b/test/data/story.yaml @@ -260,7 +260,7 @@ fields: format: "" - field: version note: "版本号" - range: 1 + range: 2{100},1{300} prefix: "" postfix: "" loop: 0 diff --git a/test/data/userview.yaml b/test/data/userview.yaml new file mode 100644 index 0000000000..dc46327f4a --- /dev/null +++ b/test/data/userview.yaml @@ -0,0 +1,36 @@ +title: table zt_userview +desc: "可访问权限" +author: automated export +version: "1.0" +fields: + - field: account + note: "用户名" + fields: + - field: account1 + range: test{100},dev{100},td{100},top{100} + - field: account2 + range: 1-100,1-100,1-100,1-100 + - field: programs + note: "项目集" + range: 1-10 + prefix: "," + postfix: "" + format: "" + - field: products + note: "产品" + range: 1-100 + prefix: "," + postfix: "" + format: "" + - field: projects + note: "项目" + range: 11-100 + prefix: "," + postfix: "" + format: "" + - field: sprints + note: "迭代" + range: 101-700 + prefix: "," + postfix: "" + format: "" diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index 182ba933f0..22bb18f4a6 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -7,6 +7,7 @@ $builder->todo = array('rows' => 2000, 'extends' => array('todo')); $builder->effort = array('rows' => 100, 'extends' => array('effort')); $builder->usergroup = array('rows' => 600, 'extends' => array('usergroup')); $builder->usercontact = array('rows' => 61, 'extends' => array('usercontact')); +$builder->userview = array('rows' => 400, 'extends' => array('userview')); $builder->dept = array('rows' => 100, 'extends' => array('dept')); $builder->action = array('rows' => 100, 'extends' => array('action')); diff --git a/test/data/zentao/processor.php b/test/data/zentao/processor.php index bf9a124e6e..1cd0d98ebb 100644 --- a/test/data/zentao/processor.php +++ b/test/data/zentao/processor.php @@ -91,6 +91,37 @@ class Processor foreach($users as $account => $user) $this->dao->update(TABLE_USER)->data($user)->where('account')->eq($account)->exec(); $this->dao->update(TABLE_USERCONTACT)->set('account')->eq('admin')->where('account')->like('admin%')->exec(); + + $productIDList = $this->dao->select('id')->from(TABLE_PRODUCT)->fetchAll(); + $projectIDList = $this->dao->select('id')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchAll(); + $sprintIDList = $this->dao->select('id')->from(TABLE_EXECUTION)->where('type')->in('sprint,stage,kanban')->fetchAll(); + + $product = array(); + $project = array(); + $sprint = array(); + foreach($productIDList as $productID) $product[] = $productID->id; + foreach($projectIDList as $projectID) $project[] = $projectID->id; + foreach($sprintIDList as $sprintID) $sprint[] = $sprintID->id; + + $products = ",".join(",",$product); + $projects = ",".join(",",$project); + $sprints = ",".join(",",$sprint); + + $userViews = new stdclass(); + $userViews->account = 'admin'; + $userViews->programs = ',1,2,3,4,5,6,7,8,9,10'; + $userViews->products = $products; + $userViews->projects = $projects; + $userViews->sprints = $sprints; + $this->dao->insert(TABLE_USERVIEW)->data($userViews)->exec(); + + $guestViews = new stdclass(); + $guestViews->account = 'guest'; + $guestViews->programs = ''; + $guestViews->products = ''; + $guestViews->projects = ''; + $guestViews->sprints = ''; + $this->dao->insert(TABLE_USERVIEW)->data($guestViews)->exec(); } /** diff --git a/test/model/bug/checkdelayedbug.php b/test/model/bug/checkdelayedbug.php new file mode 100755 index 0000000000..e00159c9aa --- /dev/null +++ b/test/model/bug/checkdelayedbug.php @@ -0,0 +1,68 @@ +#!/usr/bin/env php +checkDelayBug(); +cid=1 +pid=1 + +检查deadline在1天前 resolvedDate不存在 状态为未解决的bug是否延期 >> 1 +检查deadline在1天前 resolvedDate不存在 状态为已解决的bug是否延期 >> 1 +检查deadline在1天前 resolvedDate不存在 状态为已关闭的bug是否延期 >> 1 +检查deadline在3天前 resolvedDate在1天前 状态为未解决的bug是否延期 >> 2 +检查deadline在3天前 resolvedDate在1天前 状态为已解决的bug是否延期 >> 2 +检查deadline在3天前 resolvedDate在1天前 状态为已关闭的bug是否延期 >> 2 +检查deadline在3天前 resolvedDate在4天前 状态为未解决的bug是否延期 >> 0 +检查deadline在3天前 resolvedDate在4天前 状态为已解决的bug是否延期 >> 0 +检查deadline在3天前 resolvedDate在4天前 状态为已关闭的bug是否延期 >> 0 +检查deadline在3天后 resolvedDate在4天后 状态为未解决的bug是否延期 >> 1 +检查deadline在3天后 resolvedDate在4天后 状态为已解决的bug是否延期 >> 1 +检查deadline在3天后 resolvedDate在4天后 状态为已关闭的bug是否延期 >> 1 +检查deadline在3天后 resolvedDate在4天前 状态为未解决的bug是否延期 >> 0 +检查deadline在3天后 resolvedDate在4天前 状态为已解决的bug是否延期 >> 0 +检查deadline在3天后 resolvedDate在4天前 状态为已关闭的bug是否延期 >> 0 + +*/ + +$bug1 = new stdclass(); +$bug1->deadline = '-1'; +$bug1->resolvedDate = '0'; + +$bug2 = new stdclass(); +$bug2->deadline = '-3'; +$bug2->resolvedDate = '-1'; + +$bug3 = new stdclass(); +$bug3->deadline = '-3'; +$bug3->resolvedDate = '-4'; + +$bug4 = new stdclass(); +$bug4->deadline = '3'; +$bug4->resolvedDate = '4'; + +$bug5 = new stdclass(); +$bug5->deadline = '3'; +$bug5->resolvedDate = '-4'; + +$statusList = array('active', 'resolved', 'closed'); + +$bug = new bugTest(); +r($bug->checkDelayBugTest($bug1, $statusList[0])) && p('delay') && e('1'); // 检查deadline在1天前 resolvedDate不存在 状态为未解决的bug是否延期 +r($bug->checkDelayBugTest($bug1, $statusList[1])) && p('delay') && e('1'); // 检查deadline在1天前 resolvedDate不存在 状态为已解决的bug是否延期 +r($bug->checkDelayBugTest($bug1, $statusList[2])) && p('delay') && e('1'); // 检查deadline在1天前 resolvedDate不存在 状态为已关闭的bug是否延期 +r($bug->checkDelayBugTest($bug2, $statusList[0])) && p('delay') && e('2'); // 检查deadline在3天前 resolvedDate在1天前 状态为未解决的bug是否延期 +r($bug->checkDelayBugTest($bug2, $statusList[1])) && p('delay') && e('2'); // 检查deadline在3天前 resolvedDate在1天前 状态为已解决的bug是否延期 +r($bug->checkDelayBugTest($bug2, $statusList[2])) && p('delay') && e('2'); // 检查deadline在3天前 resolvedDate在1天前 状态为已关闭的bug是否延期 +r($bug->checkDelayBugTest($bug3, $statusList[0])) && p('delay') && e('0'); // 检查deadline在3天前 resolvedDate在4天前 状态为未解决的bug是否延期 +r($bug->checkDelayBugTest($bug3, $statusList[1])) && p('delay') && e('0'); // 检查deadline在3天前 resolvedDate在4天前 状态为已解决的bug是否延期 +r($bug->checkDelayBugTest($bug3, $statusList[2])) && p('delay') && e('0'); // 检查deadline在3天前 resolvedDate在4天前 状态为已关闭的bug是否延期 +r($bug->checkDelayBugTest($bug4, $statusList[0])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为未解决的bug是否延期 +r($bug->checkDelayBugTest($bug4, $statusList[1])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为已解决的bug是否延期 +r($bug->checkDelayBugTest($bug4, $statusList[2])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为已关闭的bug是否延期 +r($bug->checkDelayBugTest($bug5, $statusList[0])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为未解决的bug是否延期 +r($bug->checkDelayBugTest($bug5, $statusList[1])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已解决的bug是否延期 +r($bug->checkDelayBugTest($bug5, $statusList[2])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已关闭的bug是否延期 diff --git a/test/model/bug/checkdelayedbugs.php b/test/model/bug/checkdelayedbugs.php new file mode 100755 index 0000000000..56972e14a5 --- /dev/null +++ b/test/model/bug/checkdelayedbugs.php @@ -0,0 +1,32 @@ +#!/usr/bin/env php +checkDelayedBugs(); +cid=1 +pid=1 + +检查deadline在resolvedDate前 状态为未解决的bug是否延期 >> 35,33,31 +检查deadline在resolvedDate后 状态为未解决的bug是否延期 >> 0,0,0 +检查deadline在resolvedDate前 状态为已解决的bug是否延期 >> 10,8,6 +检查deadline在resolvedDate后 状态为已解决的bug是否延期 >> 0,0,0 +检查deadline在resolvedDate前 状态为已关闭的bug是否延期 >> 6,4,2 +检查deadline在resolvedDate后 状态为已关闭的bug是否延期 >> 0,0,0 + + + +*/ + +$productIDList = array('1', '7','18', '20', '28', '33'); + +$bug = new bugTest(); +r($bug->checkDelayedBugsTest($productIDList[0])) && p('delay') && e('35,33,31'); // 检查deadline在resolvedDate前 状态为未解决的bug是否延期 +r($bug->checkDelayedBugsTest($productIDList[1])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为未解决的bug是否延期 +r($bug->checkDelayedBugsTest($productIDList[2])) && p('delay') && e('10,8,6'); // 检查deadline在resolvedDate前 状态为已解决的bug是否延期 +r($bug->checkDelayedBugsTest($productIDList[3])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为已解决的bug是否延期 +r($bug->checkDelayedBugsTest($productIDList[4])) && p('delay') && e('6,4,2'); // 检查deadline在resolvedDate前 状态为已关闭的bug是否延期 +r($bug->checkDelayedBugsTest($productIDList[5])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为已关闭的bug是否延期 diff --git a/test/model/bug/createbugfromgitlabissue.php b/test/model/bug/createbugfromgitlabissue.php index a908ac8797..4643b3ea58 100755 --- a/test/model/bug/createbugfromgitlabissue.php +++ b/test/model/bug/createbugfromgitlabissue.php @@ -10,12 +10,12 @@ title=bugModel->createBugFromGitlabIssue (); cid=1 pid=1 -测试正常的创建来源于gitlab issue的bug title >> 问题1 -测试短时间内重复创建来源于gitlab issue的bug >> 0 -测试正常的创建来源于gitlab issue的bug execution >> 101 -测试正常的创建来源于gitlab issue的bug pri >> 3 -测试正常的创建来源于gitlab issue的bug severity >> 3 -测试创建没有标题 来源于gitlab issue的异常bug >> 『Bug标题』不能为空。 +测试正常的创建来源于gitlab issue的bug的title >> 问题1 +测试正常的创建来源于gitlab issue的bug的execution >> 101 +测试正常的创建来源于gitlab issue的bug的pri >> 3 +测试正常的创建来源于gitlab issue的bug的severity >> 3 +测试创建没有标题 来源于gitlab issue的异常bug >> 『Bug标题』不能为空。 +测试短时间内重复创建来源于gitlab issue的bug >> 0 */ @@ -43,11 +43,11 @@ $bug5->title = ''; $bug5->execution = $executionID; $bug=new bugTest(); -r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('title') && e('问题1'); // 测试正常的创建来源于gitlab issue的bug title -r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('task') && e('0'); // 测试短时间内重复创建来源于gitlab issue的bug -r($bug->createBugFromGitlabIssueTest($bug2, $executionID)) && p('execution') && e($executionID); // 测试正常的创建来源于gitlab issue的bug execution -r($bug->createBugFromGitlabIssueTest($bug3, $executionID)) && p('pri') && e('3'); // 测试正常的创建来源于gitlab issue的bug pri -r($bug->createBugFromGitlabIssueTest($bug4, $executionID)) && p('severity') && e('3'); // 测试正常的创建来源于gitlab issue的bug severity +r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('title') && e('问题1'); // 测试正常的创建来源于gitlab issue的bug的title +r($bug->createBugFromGitlabIssueTest($bug2, $executionID)) && p('execution') && e("$executionID"); // 测试正常的创建来源于gitlab issue的bug的execution +r($bug->createBugFromGitlabIssueTest($bug3, $executionID)) && p('pri') && e('3'); // 测试正常的创建来源于gitlab issue的bug的pri +r($bug->createBugFromGitlabIssueTest($bug4, $executionID)) && p('severity') && e('3'); // 测试正常的创建来源于gitlab issue的bug的severity r($bug->createBugFromGitlabIssueTest($bug5, $executionID)) && p('title:0') && e('『Bug标题』不能为空。'); // 测试创建没有标题 来源于gitlab issue的异常bug +r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('task') && e('0'); // 测试短时间内重复创建来源于gitlab issue的bug system("./ztest init"); diff --git a/test/model/bug/getallbugs.php b/test/model/bug/getallbugs.php new file mode 100755 index 0000000000..075176cbae --- /dev/null +++ b/test/model/bug/getallbugs.php @@ -0,0 +1,38 @@ +#!/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 diff --git a/test/model/bug/getbugs.php b/test/model/bug/getbugs.php index 4067cf0aa3..555f068e81 100755 --- a/test/model/bug/getbugs.php +++ b/test/model/bug/getbugs.php @@ -13,12 +13,12 @@ pid=1 查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1 >> BUG3,BUG2,BUG1 查询正常产品 不存在的分支主干 查看全部 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1 查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1 -查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> 0 +查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> BUG1 查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接 >> BUG3,BUG2,BUG1 -查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*'":.<>。?/();175 -查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*'":.<>。?/();175 +查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 +查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 >> 0 -查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*'":.<>。?/();175 +查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 >> 0 查询不存在的产品的全部bug的标题拼接 >> 0 @@ -34,13 +34,11 @@ $bug=new bugTest(); r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1 r($bug->getBugsTest($productIDList[0], $branchList[1], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 不存在的分支主干 查看全部 没有模块的全部bug的标题拼接 r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[1], $moduleIDList[0])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 -r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[1])) && p('title') && e('0'); // 查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 +r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[3])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接 -r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*\'":.<>。?/();175'); // 查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 -r($bug->getBugsTest($productIDList[1], $branchList[1], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*\'":.<>。?/();175'); // 查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 +r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175'); // 查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 +r($bug->getBugsTest($productIDList[1], $branchList[1], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175'); // 查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 r($bug->getBugsTest($productIDList[1], $branchList[2], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 -r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[1], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*\'":.<>。?/();175'); // 查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 +r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[1], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175'); // 查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 r($bug->getBugsTest($productIDList[2], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品的全部bug的标题拼接 - -system("./ztest init"); diff --git a/test/model/bug/getbyassigntome.php b/test/model/bug/getbyassigntome.php new file mode 100755 index 0000000000..b726006ef7 --- /dev/null +++ b/test/model/bug/getbyassigntome.php @@ -0,0 +1,38 @@ +#!/usr/bin/env php +getByAssigntome(); +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->getByAssigntomeTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下指派给我的bug diff --git a/test/model/bug/getbyassigntonull.php b/test/model/bug/getbyassigntonull.php new file mode 100755 index 0000000000..53b5bee530 --- /dev/null +++ b/test/model/bug/getbyassigntonull.php @@ -0,0 +1,25 @@ +#!/usr/bin/env php +getByAssigntonull(); +cid=1 +pid=1 + +查询产品1 581 58 不存在的产品10001下由我创建的bug >> BUG174,BUG173,BUG172,BUG93,BUG92,BUG91 +查询产品1 58下由我创建的bug >> BUG174,BUG173,BUG172 +查询不存在的产品10001下由我创建的bug >> 0 + +*/ + +$productIDList = array('1,31,58,1000001', '1,58', '1000001'); + +$bug=new bugTest(); + +r($bug->getByAssigntonullTest($productIDList[0])) && p('title') && e('BUG174,BUG173,BUG172,BUG93,BUG92,BUG91'); // 查询产品1 581 58 不存在的产品10001下由我创建的bug +r($bug->getByAssigntonullTest($productIDList[1])) && p('title') && e('BUG174,BUG173,BUG172'); // 查询产品1 58下由我创建的bug +r($bug->getByAssigntonullTest($productIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001下由我创建的bug diff --git a/test/model/bug/getbylonglifebugs.php b/test/model/bug/getbylonglifebugs.php new file mode 100755 index 0000000000..669f9be4e6 --- /dev/null +++ b/test/model/bug/getbylonglifebugs.php @@ -0,0 +1,44 @@ +#!/usr/bin/env php +getByLonglifebugs(); +cid=1 +pid=1 + +查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0 +查询产品1 2 3 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 +查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG1 +查询产品1 3与模块1821, 1825下长时间未关闭的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下长时间未关闭的bug >> 0 +查询产品13 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 +查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0 +查询不存在的产品10001下长时间未关闭的bug >> 0 + +*/ + +$productIDList = array('1,2,3,1000001', '1,3', '1000001'); +$moduleIDList = array('1821,1825,1832,1000001', '1821, 1825', '1000001', '0'); + +$bug=new bugTest(); + +r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('bug8,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1'); // 查询产品1 2 3 不存在的产品10001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('bug8,BUG1'); // 查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1'); // 查询产品13 不存在的产品10001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下长时间未关闭的bug diff --git a/test/model/bug/getbyopenedbyme.php b/test/model/bug/getbyopenedbyme.php new file mode 100755 index 0000000000..cb03a78624 --- /dev/null +++ b/test/model/bug/getbyopenedbyme.php @@ -0,0 +1,38 @@ +#!/usr/bin/env php +getByOpenedbyme(); +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->getByOpenedbymeTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下由我创建的bug diff --git a/test/model/bug/getbypostponedbugs.php b/test/model/bug/getbypostponedbugs.php new file mode 100755 index 0000000000..60bcb2a2ea --- /dev/null +++ b/test/model/bug/getbypostponedbugs.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getByPostponedbugs(); +cid=1 +pid=1 + +查询产品25 32 48 100001下被延期的bug >> BUG94,BUG75,BUG74,BUG73 +查询产品25下被延期的bug >> BUG75,BUG74,BUG73 +查询产品32下被延期的bug >> BUG94 +查询产品1下被延期的bug >> 0 +查询不存在的产品10001下被延期的bug >> 0 + +*/ + +$productIDList = array('25,32,48,1000001', '25' , '32', '1', '1000001'); + +$bug=new bugTest(); + +r($bug->getByPostponedBugsTest($productIDList[0])) && p('title') && e('BUG94,BUG75,BUG74,BUG73'); // 查询产品25 32 48 100001下被延期的bug +r($bug->getByPostponedBugsTest($productIDList[1])) && p('title') && e('BUG75,BUG74,BUG73'); // 查询产品25下被延期的bug +r($bug->getByPostponedBugsTest($productIDList[2])) && p('title') && e('BUG94'); // 查询产品32下被延期的bug +r($bug->getByPostponedBugsTest($productIDList[3])) && p('title') && e('0'); // 查询产品1下被延期的bug +r($bug->getByPostponedBugsTest($productIDList[4])) && p('title') && e('0'); // 查询不存在的产品10001下被延期的bug diff --git a/test/model/bug/getbyresolvedbyme.php b/test/model/bug/getbyresolvedbyme.php new file mode 100755 index 0000000000..222c1c237d --- /dev/null +++ b/test/model/bug/getbyresolvedbyme.php @@ -0,0 +1,27 @@ +#!/usr/bin/env php +getByResolvedbyme(); +cid=1 +pid=1 + +查询产品1 29 98 不存在的产品10001 下由我解决的bug >> BUG294,BUG293,BUG292,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85 +查询产品1 98下由我解决的bug >> BUG294,BUG293,BUG292 +查询产品29下由我解决的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85 +查询不存在的产品10001 下由我解决的bug >> 0 + +*/ + +$productIDList = array('1,29,98,1000001', '1,98', '29', '1000001'); + +$bug=new bugTest(); + +r($bug->getByResolvedbymeTest($productIDList[0])) && p('title') && e('BUG294,BUG293,BUG292,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85'); // 查询产品1 29 98 不存在的产品10001 下由我解决的bug +r($bug->getByResolvedbymeTest($productIDList[1])) && p('title') && e('BUG294,BUG293,BUG292'); // 查询产品1 98下由我解决的bug +r($bug->getByResolvedbymeTest($productIDList[2])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85'); // 查询产品29下由我解决的bug +r($bug->getByResolvedbymeTest($productIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001 下由我解决的bug diff --git a/test/model/bug/getbystatus.php b/test/model/bug/getbystatus.php new file mode 100755 index 0000000000..0073e2aa57 --- /dev/null +++ b/test/model/bug/getbystatus.php @@ -0,0 +1,75 @@ +#!/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 diff --git a/test/model/bug/getmodulebugs.php b/test/model/bug/getmodulebugs.php new file mode 100755 index 0000000000..7d4b537d4d --- /dev/null +++ b/test/model/bug/getmodulebugs.php @@ -0,0 +1,38 @@ +#!/usr/bin/env php +getModuleBugs(); +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->getModuleBugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug +r($bug->getModuleBugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug +r($bug->getModuleBugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug +r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug +r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下的bug +r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下的bug +r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug +r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下的bug +r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug diff --git a/test/model/bug/getoverduebugs.php b/test/model/bug/getoverduebugs.php new file mode 100755 index 0000000000..e8aaf13ba4 --- /dev/null +++ b/test/model/bug/getoverduebugs.php @@ -0,0 +1,44 @@ +#!/usr/bin/env php +getOverdueBugs(); +cid=1 +pid=1 + +查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下过期未解决的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0 +查询产品1 2 3 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 +查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG1 +查询产品1 3与模块1821, 1825下过期未解决的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下过期未解决的bug >> 0 +查询产品13 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 +查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下过期未解决的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0 +查询不存在的产品10001下过期未解决的bug >> 0 + +*/ + +$productIDList = array('1,2,3,1000001', '1,3', '1000001'); +$moduleIDList = array('1821,1825,1832,1000001', '1821, 1825', '1000001', '0'); + +$bug=new bugTest(); + +r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('bug8,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1'); // 查询产品1 2 3 不存在的产品10001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('bug8,BUG1'); // 查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1'); // 查询产品13 不存在的产品10001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下过期未解决的bug diff --git a/test/model/bug/getunconfirmed.php b/test/model/bug/getunconfirmed.php new file mode 100755 index 0000000000..ce0d9fae1f --- /dev/null +++ b/test/model/bug/getunconfirmed.php @@ -0,0 +1,44 @@ +#!/usr/bin/env php +getUnconfirmed(); +cid=1 +pid=1 + +查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下未确认的bug >> BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0 +查询产品1 2 3 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG5,BUG3,BUG1 +查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1 +查询产品1 3与模块1821, 1825下未确认的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下未确认的bug >> 0 +查询产品13 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG1 +查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下未确认的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0 +查询不存在的产品10001下未确认的bug >> 0 + +*/ + +$productIDList = array('1,2,3,1000001', '1,3', '1000001'); +$moduleIDList = array('1821,1825,1832,1000001', '1821, 1825', '1000001', '0'); + +$bug=new bugTest(); + +r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[0])) && p('title') && e('BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下未确认的bug +r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[3])) && p('title') && e('BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG5,BUG3,BUG1'); // 查询产品1 2 3 不存在的产品10001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[0])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下未确认的bug +r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[3])) && p('title') && e('BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG1'); // 查询产品13 不存在的产品10001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下未确认的bug +r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下未确认的bug diff --git a/test/model/execution/getburndataflot.php b/test/model/execution/getburndataflot.php index 0a6f22deed..61b02ca1b6 100755 --- a/test/model/execution/getburndataflot.php +++ b/test/model/execution/getburndataflot.php @@ -10,9 +10,9 @@ title=测试executionModel->getBurnDataFlotTest(); cid=1 pid=1 -敏捷执行查询统计 >> 2 -瀑布执行查询统计 >> 2 -看板执行查询统计 >> 1 +敏捷执行查询统计 >> 3 +瀑布执行查询统计 >> 3 +看板执行查询统计 >> 3 */ @@ -20,6 +20,6 @@ $executionIDList = array('101', '131', '161'); $count = array('0','1'); $execution = new executionTest(); -r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行查询统计 -r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('2'); // 瀑布执行查询统计 -r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('3'); // 敏捷执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('3'); // 瀑布执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('3'); // 看板执行查询统计 \ No newline at end of file diff --git a/test/model/execution/getkanbangroupdata.php b/test/model/execution/getkanbangroupdata.php deleted file mode 100755 index 4d4a731e06..0000000000 --- a/test/model/execution/getkanbangroupdata.php +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env php -getKanbanGroupDataTest(); -cid=1 -pid=1 - -敏捷执行查询 >> 子任务6,101 -瀑布执行查询 >> 更多任务93,131 -看板执行查询 >> 开发任务71,161 -敏捷执行查询统计 >> 11 -瀑布执行查询统计 >> 4 -看板执行查询统计 >> 4 - -*/ - -$executionIDList = array('101', '131', '161'); -$count = array('0', '1'); - -$execution = new executionTest(); -var_dump($execution->getKanbanGroupDataTest($executionIDList[0], $count[0]));die; -r($execution->getKanbanGroupDataTest($executionIDList[0], $count[0])) && p('906:name,execution') && e('子任务6,101'); // 敏捷执行查询 -r($execution->getKanbanGroupDataTest($executionIDList[1], $count[0])) && p('693:name,execution') && e('更多任务93,131'); // 瀑布执行查询 -r($execution->getKanbanGroupDataTest($executionIDList[2], $count[0])) && p('61:name,execution') && e('开发任务71,161'); // 看板执行查询 -r($execution->getKanbanGroupDataTest($executionIDList[0], $count[1])) && p() && e('11'); // 敏捷执行查询统计 -r($execution->getKanbanGroupDataTest($executionIDList[1], $count[1])) && p() && e('4'); // 瀑布执行查询统计 -r($execution->getKanbanGroupDataTest($executionIDList[2], $count[1])) && p() && e('4'); // 看板执行查询统计 \ No newline at end of file diff --git a/test/model/execution/getplans.php b/test/model/execution/getplans.php index 342f09fb40..1617f1397c 100755 --- a/test/model/execution/getplans.php +++ b/test/model/execution/getplans.php @@ -11,7 +11,7 @@ cid=1 pid=1 全部执行计划查询 >> 长名称 -执行计划查询 >> 1.1 [2021-05-23 ~ 2021-09-23] +执行计划查询 >> 1.1 全部执行计划查询 >> 2 */ @@ -21,6 +21,6 @@ $executionIDList = array('0','101'); $count = array('0','1'); $execution = new executionTest(); -r($execution->getPlansTest($productIDList, $executionIDList[0], $count[0])) && p('1:3') && e('长名称'); // 全部执行计划查询 -r($execution->getPlansTest($productIDList, $executionIDList[1], $count[0])) && p('1:2') && e('1.1 [2021-05-23 ~ 2021-09-23]'); // 执行计划查询 -r($execution->getPlansTest($productIDList, $executionIDList[0], $count[1])) && p() && e('2'); // 全部执行计划查询 \ No newline at end of file +r($execution->getPlansTest($productIDList, $executionIDList[0], $count[0])) && p('1:3') && e('长名称'); // 全部执行计划查询 +r($execution->getPlansTest($productIDList, $executionIDList[1], $count[0])) && p('1:2') && e('1.1'); // 执行计划查询 +r($execution->getPlansTest($productIDList, $executionIDList[0], $count[1])) && p() && e('2'); // 全部执行计划查询 \ No newline at end of file diff --git a/test/model/execution/gettasks.php b/test/model/execution/gettasks.php index 1a5241854b..b50a9f4f2e 100755 --- a/test/model/execution/gettasks.php +++ b/test/model/execution/gettasks.php @@ -34,7 +34,7 @@ doing任务查询统计 >> 1 undone任务查询统计 >> 3 done任务查询统计 >> 1 根据查询条件查询任务统计 >> 1 -根据模块查询任务统计 >> 2 +根据模块查询任务统计 >> 8 name_asc,id_asc排序查询统计 >> 4 id_asc排序查询统计 >> 4 pri_desc,id_desc排序查询统计 >> 4 @@ -74,7 +74,7 @@ r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3], r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[4],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('3'); // undone任务查询统计 r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[5],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // done任务查询统计 r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[7],$queryID[1],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // 根据查询条件查询任务统计 -r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[1])) && p() && e('2'); // 根据模块查询任务统计 +r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[1])) && p() && e('8'); // 根据模块查询任务统计 r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[1],$count[1])) && p() && e('4'); // name_asc,id_asc排序查询统计 r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[2],$count[1])) && p() && e('4'); // id_asc排序查询统计 r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[3],$count[1])) && p() && e('4'); // pri_desc,id_desc排序查询统计 \ No newline at end of file diff --git a/test/model/execution/getteamskip.php b/test/model/execution/getteamskip.php index 94ffb3ce8e..68daeb456a 100755 --- a/test/model/execution/getteamskip.php +++ b/test/model/execution/getteamskip.php @@ -10,17 +10,17 @@ title=测试executionModel->getTeamSkipTest(); cid=1 pid=1 -正常跳过 >> 901,admin,研发 +正常跳过 >> 901,user92,研发 begin与end一致 >> 无跳转数据 end与begin一致 >> 无跳转数据 */ $taskID = 901; -$begin = 'admin'; -$end = 'user92'; +$begin = 'user92'; +$end = 'user93'; $execution = new executionTest(); -r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('admin:root,account,role') && e('901,admin,研发'); // 正常跳过 -r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致 -r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致 \ No newline at end of file +r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('user92:root,account,role') && e('901,user92,研发'); // 正常跳过 +r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致 +r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致 \ No newline at end of file diff --git a/test/model/execution/processburndata.php b/test/model/execution/processburndata.php index a19398ef6d..7d380b72c0 100755 --- a/test/model/execution/processburndata.php +++ b/test/model/execution/processburndata.php @@ -11,8 +11,8 @@ cid=1 pid=1 敏捷执行查询统计 >> 29 -瀑布执行查询统计 >> 60 -看板执行查询统计 >> 60 +瀑布执行查询统计 >> 59 +看板执行查询统计 >> 62 错误时间查询统计 >> 0 */ @@ -25,6 +25,6 @@ $count = array('0','1'); $execution = new executionTest(); r($execution->processBurnDataTest($executionIDList[0], $itemCounts[0], $begin[0], $end[0], $count[1])) && p() && e('29'); // 敏捷执行查询统计 -r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('60'); // 瀑布执行查询统计 -r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('60'); // 看板执行查询统计 +r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('59'); // 瀑布执行查询统计 +r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('62'); // 看板执行查询统计 r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计 \ No newline at end of file diff --git a/test/model/execution/statrelateddata.php b/test/model/execution/statrelateddata.php index 0a39dc3c63..11093910c6 100755 --- a/test/model/execution/statrelateddata.php +++ b/test/model/execution/statrelateddata.php @@ -10,7 +10,7 @@ title=测试executionModel->statRelatedDataTest(); cid=1 pid=1 -敏捷执行数据统计 >> 3 +敏捷执行数据统计 >> 2 瀑布执行数据统计 >> 4 看板执行数据统计 >> 3 @@ -19,6 +19,6 @@ pid=1 $executionIDList = array('101', '131', '161'); $execution = new executionTest(); -r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('3'); // 敏捷执行数据统计 +r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('2'); // 敏捷执行数据统计 r($execution->statRelatedDataTest($executionIDList[1])) && p('taskCount') && e('4'); // 瀑布执行数据统计 r($execution->statRelatedDataTest($executionIDList[2])) && p('bugCount') && e('3'); // 看板执行数据统计 \ No newline at end of file diff --git a/test/model/execution/update.php b/test/model/execution/update.php index e37e101a40..7ce1bae9ee 100755 --- a/test/model/execution/update.php +++ b/test/model/execution/update.php @@ -11,7 +11,7 @@ cid=1 pid=1 测试重复迭代code >> 『迭代代号』已经有『project1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -测试修改迭代名称 >> name,迭代1,任务名修改 +测试修改迭代名称 >> name,迭代1,迭代名修改 测试修改迭代项目为瀑布项目 >> project,11,41 测试修改迭代项目为看板项目 >> project,41,71 测试修改迭代code >> code,project31,code修改 @@ -44,7 +44,7 @@ $repeatcode = array('name' => '迭代名修改1'); $execution = new executionTest(); r($execution->updateObject($executionIDList[0], $repeatcode)) && p('code:0') && e('『迭代代号』已经有『project1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试重复迭代code -r($execution->updateObject($executionIDList[0], $changeName)) && p('0:field,old,new') && e('name,迭代1,任务名修改'); // 测试修改迭代名称 +r($execution->updateObject($executionIDList[0], $changeName)) && p('0:field,old,new') && e('name,迭代1,迭代名修改'); // 测试修改迭代名称 r($execution->updateObject($executionIDList[0], $changeStage)) && p('0:field,old,new') && e('project,11,41'); // 测试修改迭代项目为瀑布项目 r($execution->updateObject($executionIDList[0], $changeKanban)) && p('0:field,old,new') && e('project,41,71'); // 测试修改迭代项目为看板项目 r($execution->updateObject($executionIDList[1], $changeCode)) && p('0:field,old,new') && e('code,project31,code修改'); // 测试修改迭代code diff --git a/test/model/product/move.sh b/test/model/product/move.sh deleted file mode 100644 index 83d843101e..0000000000 --- a/test/model/product/move.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#This script is use to rename files -for file in * ; -do mv $file `echo $file | tr 'A-Z' 'a-z'`; -done diff --git a/test/model/product_bak/create.php b/test/model/product_bak/create.php deleted file mode 100755 index 87abb462a7..0000000000 --- a/test/model/product_bak/create.php +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env php -create(); -cid=1 -pid=1 - -测试正常的创建 >> case1 -测试不填产品代号的情况 >> 『code』不能为空。 -测试创建重复的产品 >> 『code』已经有『testcase1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -测试不填产品名称的情况 >> 『name』不能为空。 -测试传入name和code >> case3,testcase3 -测试传入program、name、code >> 3,case4,testcase4 -测试传入program、name、code、type、status >> 4,branch,closed - -*/ - -$config = new stdClass(); -$config->createFields->product = array('program' => '', 'name' => '', 'code' => '', 'PO' => '', 'QD' => '', 'RD' => '', 'type' => 'normal', 'status' => 'normal', 'desc' => '', 'acl' => 'private'); -/* -function createObject($module = '', $param = array()) -{ - global $config; - foreach($config->createFields->$module as $field => $defaultValue) $_POST[$field] = $defaultValue; - - foreach($param as $key => $value) $_POST[$key] = $value; - - global $tester; - $objectModel = $tester->loadModel($module); - $objectID = $objectModel->create(); - unset($_POST); - - if(dao::isError()) - { - return dao::getError(); - } - else - { - $object = $objectModel->getByID($objectID); - return $object; - } -}*/ -$createObject = new Product('admin'); - -$create1 = array('name' => 'case1', 'code' => 'testcase1'); -$create2 = array('name' => 'case2'); -$create3 = array('name' => 'case1', 'code' => 'testcase1'); -$create4 = array('code' => 'testcase1'); -$create5 = array('name' => 'case3', 'code' => 'testcase3'); -$create6 = array('program' => '3', 'name' => 'case4', 'code' => 'testcase4'); -$create7 = array('program' => '4', 'name' => 'case5', 'code' => 'testcase5', 'type' => 'branch', 'status' => 'closed'); - -r($createObject->createObject('product', $create1)) && p('name') && e('case1'); // 测试正常的创建 -r($createObject->createObject('product', $create2)) && p('code:0') && e('『code』不能为空。'); // 测试不填产品代号的情况 -r($createObject->createObject('product', $create3)) && p('code:0') && e('『code』已经有『testcase1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试创建重复的产品 -r($createObject->createObject('product', $create4)) && p('name:0') && e('『name』不能为空。'); // 测试不填产品名称的情况 -r($createObject->createObject('product', $create5)) && p('name,code') && e('case3,testcase3'); // 测试传入name和code -r($createObject->createObject('product', $create6)) && p('program,name,code') && e('3,case4,testcase4'); // 测试传入program、name、code -r($createObject->createObject('product', $create7)) && p('program,type,status') && e('4,branch,closed'); // 测试传入program、name、code、type、status -system("./ztest init"); \ No newline at end of file diff --git a/test/model/product_bak/getLatestProject.php b/test/model/product_bak/getLatestProject.php deleted file mode 100755 index 3b6f42f1dc..0000000000 --- a/test/model/product_bak/getLatestProject.php +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env php -getLatestProject(); -cid=1 -pid=1 - -测试产品25关联的最后一个未关闭的项目,按begin字段排序 >> 315 -测试产品38关联的最后一个未关闭的项目,按begin字段排序 >> 阶段588 -传入不存在的产品 >> 没有数据 - -*/ - -$project = new Product('admin'); - -#var_dump($z->testGetLatestProject(38));die; -r($project->testGetLatestProject(25)) && p('id') && e('315'); // 测试产品25关联的最后一个未关闭的项目,按begin字段排序 -r($project->testGetLatestProject(38)) && p('name') && e('阶段588'); // 测试产品38关联的最后一个未关闭的项目,按begin字段排序 -r($project->testGetLatestProject(101)) && p() && e('没有数据'); // 传入不存在的产品 \ No newline at end of file diff --git a/test/model/product_bak/getList.php b/test/model/product_bak/getList.php deleted file mode 100755 index 9843c25e3a..0000000000 --- a/test/model/product_bak/getList.php +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env php -getList(); -cid=1 -pid=1 - -返回项目集1下的产品数量 >> 9 -测试传入programID=0的情况 >> 100 -传入不存在的项目集 >> 0 -返回项目集1下的未关闭的产品数量 >> 5 -获取所有的未关闭的产品数量 >> 60 -返回项目集1下的关闭了的产品数量 >> 4 -返回所有的未关闭的产品数量 >> 40 -返回项目集1下的与当前用户有关系的产品数量 >> 0 -返回项目集1下产品线1的产品数量 >> 9 -返回项目集1下产品线2的产品数量 >> 0 - -*/ - -class Tester -{ - public function __construct($user) - { - global $tester; - su($user); - $this->product = $tester->loadModel('product'); - } - public function getAllProducts($programID) - { - return $this->product->getList($programID); - } - public function getAllProductsCount($programID) - { - return count($this->getAllProducts($programID)); - } - - public function getNoclosedProducts($programID) - { - return $this->product->getList($programID, 'noclosed'); - } - public function getNoclosedProductsCount($programID) - { - return count($this->getNoclosedProducts($programID)); - } - - public function getClosedProducts($programID) - { - return $this->product->getList($programID, 'closed'); - } - public function getClosedProductsCount($programID) - { - return count($this->getClosedProducts($programID)); - } - - public function getInvolvedProducts($programID) - { - return $this->product->getList($programID, 'involved'); - } - public function getInvolvedProductsCount($programID) - { - return count($this->getInvolvedProducts($programID)); - } - - public function getProductsByLine($programID, $line = 0) - { - return $this->product->getList($programID, 'all', 0, $line); - } - public function countProductsByLine($programID, $line = 0) - { - return count($this->getProductsByLine($programID, $line)); - } - - public function getProductList($programID, $status = 'all', $line = 0) - { - return $this->product->getList($programID, $status, 0, $line); - } - public function getProductCount($programID, $status = 'all', $line = 0) - { - return count($this->getProductList($programID, $status, $line)); - } -} - -$adminTester = new Tester('admin'); - -r($adminTester->getAllProductsCount(1)) && p() && e('9'); // 返回项目集1下的产品数量 -r($adminTester->getAllProductsCount(0)) && p() && e('100'); // 测试传入programID=0的情况 -r($adminTester->getAllProductsCount(11)) && p() && e('0'); // 传入不存在的项目集 - -r($adminTester->getNoclosedProductsCount(1)) && p() && e('5'); // 返回项目集1下的未关闭的产品数量 -r($adminTester->getNoclosedProductsCount(0)) && p() && e('60'); // 获取所有的未关闭的产品数量 - -r($adminTester->getClosedProductsCount(1)) && p() && e('4'); // 返回项目集1下的关闭了的产品数量 -r($adminTester->getClosedProductsCount(0)) && p() && e('40'); // 返回所有的未关闭的产品数量 - -r($adminTester->getInvolvedProductsCount(1)) && p() && e('0'); // 返回项目集1下的与当前用户有关系的产品数量 - -r($adminTester->countProductsByLine(1, 1)) && p() && e('9'); // 返回项目集1下产品线1的产品数量 -r($adminTester->countProductsByLine(1, 2)) && p() && e('0'); // 返回项目集1下产品线2的产品数量 \ No newline at end of file diff --git a/test/model/product_bak/getPairs.php b/test/model/product_bak/getPairs.php deleted file mode 100755 index 88967403cf..0000000000 --- a/test/model/product_bak/getPairs.php +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env php -getPairs(); -cid=1 -pid=1 - -测试项目集10下的11号产品 >> 正常产品11 -测试项目集10下的55号产品 >> 多分支产品55 -测试项目集10下的99号产品 >> 多平台产品99 -测试不存在的项目集 >> 没有数据 -返回所有产品的数量 >> 100 -返回项目集10下的所有产品 >> 9 -测试项目集10下的未关闭产品5 >> 正常产品6 -返回项目集10下的未关闭产品的数量 >> 5 -测试顺序program_desc >> 1 -测试顺序program_asc >> 1 -测试顺序type_desc >> 1 - -*/ - -$tester = new productBox('admin'); -var_dump($tester->getProductPairsByOrder(10, '', 'program_desc'));die; -r($tester->getProductPairs(10)) && p('11') && e('正常产品11'); // 测试项目集10下的11号产品 -r($tester->getProductPairs(10)) && p('55') && e('多分支产品55'); // 测试项目集10下的55号产品 -r($tester->getProductPairs(10)) && p('99') && e('多平台产品99'); // 测试项目集10下的99号产品 -r($tester->getProductPairs(11)) && p() && e('没有数据'); // 测试不存在的项目集 - -r($tester->getProductPairsCount(0)) && p() && e('100'); // 返回所有产品的数量 -r($tester->getProductPairsCount(10)) && p() && e('9'); // 返回项目集10下的所有产品 -r($tester->getNoclosedPairs(5)) && p('6') && e('正常产品6'); // 测试项目集10下的未关闭产品5 -r($tester->getNoclosedPairsCount(10)) && p() && e('5'); // 返回项目集10下的未关闭产品的数量 - -r($tester->getProductPairsByOrder(10, '', 'program_desc')) && p() && e('1'); // 测试顺序program_desc -r($tester->getProductPairsByOrder(11, '', 'program_asc')) && p() && e('1'); // 测试顺序program_asc -r($tester->getProductPairsByOrder(11, '', 'type_desc')) && p() && e('1'); // 测试顺序type_desc \ No newline at end of file diff --git a/test/model/product_bak/getPairscopy.php b/test/model/product_bak/getPairscopy.php deleted file mode 100755 index a0bbf5f244..0000000000 --- a/test/model/product_bak/getPairscopy.php +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env php -getPairs(); -cid=1 -pid=1 - -测试项目集10下的11号产品 >> 正常产品11 -测试项目集10下的55号产品 >> 多分支产品55 -测试项目集10下的99号产品 >> 多平台产品99 -测试不存在的项目集 >> 没有数据 -返回所有产品的数量 >> 100 -返回项目集10下的所有产品 >> 9 -测试项目集10下的未关闭产品5 >> 正常产品6 -返回项目集10下的未关闭产品的数量 >> 5 -测试顺序program_desc >> 1 -测试顺序program_asc >> 1 -测试顺序type_desc >> 1 - -*/ - -class Tester -{ - public function __construct($user, $orderBy = 'id_desc') - { - global $tester; - su($user); - $this->product = $tester->loadModel('product'); - $this->config = new stdclass(); - $this->config->product->orderBy = $orderBy; - } - - public function getProductPairs($programID) - { - $pairs = $this->product->getPairs('', $programID); - if($pairs == array()) return '没有数据'; - return $pairs; - } - public function getProductPairsCount($programID) - { - $pairsCount = count($this->getProductPairs($programID)); - if($pairsCount == '没有数据') return '0'; - return $pairsCount; - } - - public function getAllPairs($programID) - { - $pairs = $this->product->getPairs('all', $programID); - if($pairs == array()) return '没有数据'; - return $pairs; - } - public function getAllPairsCount($programID) - { - $pairsCount = count($this->getAllPairs($programID)); - if($pairsCount == '没有数据') return '0'; - return $pairsCount; - } - - public function getNoclosedPairs($programID) - { - $pairs = $this->product->getPairs('noclosed', $programID); - if($pairs == array()) return '没有数据'; - return $pairs; - } - public function getNoclosedPairsCount($programID) - { - $pairsCount = count($this->getNoclosedPairs($programID)); - if($pairsCount == '没有数据') return '0'; - return $pairsCount; - } - - public function getProductPairsByOrder($programID, $mode = '', $orderBy = 'id_desc') - { - $this->config->product->orderBy = $orderBy; - $pairs = $this->product->getPairs($mode, $programID); - return checkOrder($pairs, $orderBy); - } -} - -$tester = new Tester('admin'); - -r($tester->getProductPairs(10)) && p('11' && e('正常产品11'); // 测试项目集10下的11号产品 -r($tester->getProductPairs(10)) && p('55') && e('多分支产品55'); // 测试项目集10下的55号产品 -r($tester->getProductPairs(10)) && p('99') && e('多平台产品99'); // 测试项目集10下的99号产品 -r($tester->getProductPairs(11)) && p() && e('没有数据'); // 测试不存在的项目集 -r($tester->getProductPairsCount(0)) && p() && e('100'); // 返回所有产品的数量 -r($tester->getProductPairsCount(10)) && p() && e('9'); // 返回项目集10下的所有产品 -r($tester->getNoclosedPairs(5)) && p('6') && e('正常产品6'); // 测试项目集10下的未关闭产品5 -r($tester->getNoclosedPairsCount(10)) && p() && e('5'); // 返回项目集10下的未关闭产品的数量 -r($tester->getProductPairsByOrder(10, '', 'program_desc')) && p() && e('1'); // 测试顺序program_desc -r($tester->getProductPairsByOrder(11, '', 'program_asc')) && p() && e('1'); // 测试顺序program_asc -r($tester->getProductPairsByOrder(11, '', 'type_desc')) && p() && e('1'); // 测试顺序type_desc \ No newline at end of file diff --git a/test/model/product_bak/getProjectListByProduct.php b/test/model/product_bak/getProjectListByProduct.php deleted file mode 100755 index 70d7480131..0000000000 --- a/test/model/product_bak/getProjectListByProduct.php +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env php -getProjectListByProduct(); -cid=1 -pid=1 - -返回产品1关联的项目11名字 >> 项目11 -返回产品1关联的项目21名字 >> 项目1 -传入不存在的产品 >> 没有数据 - -*/ - -class Tester -{ - public function __construct($user) - { - global $tester; - su($user); - $this->product = $tester->loadModel('product'); - } - - public function getAllProjectsByProduct($productID) - { - $projects = $this->product->getProjectListByProduct($productID, 'all'); - if($projects == array()) return '没有数据'; - return $projects; - } - - public function getProjectsByStatus($productID, $status) - { - $projects = $this->product->getProjectListByProduct($productID, $browseType); - if($projects == array()) return '没有数据'; - return $projects; - } -} - -$tester = new Tester('admin'); -r($tester->getAllProjectsByProduct(1)) && p('21:name') && e('项目11'); // 返回产品1关联的项目11名字 -r($tester->getAllProjectsByProduct(1)) && p('11:name') && e('项目1'); // 返回产品1关联的项目21名字 -r($tester->getAllProjectsByProduct(101)) && p() && e('没有数据'); // 传入不存在的产品 \ No newline at end of file diff --git a/test/model/product_bak/getProjectPairsByProduct.php b/test/model/product_bak/getProjectPairsByProduct.php deleted file mode 100755 index db4b5a7565..0000000000 --- a/test/model/product_bak/getProjectPairsByProduct.php +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env php -getProjectPairsByProduct(); -cid=1 -pid=1 - -返回产品1关联的项目11名字 >> 项目1 -返回产品1关联的项目21名字 >> 项目11 -传入不存在的产品 >> 没有数据 -返回id为15的项目名 >> 项目5 -传入不存在的项目id >> 没有数据 - -*/ - -$tester = new productBox('admin'); - -r($tester->getProjectPairsByProductID(1)) && p('11') && e('项目1'); // 返回产品1关联的项目11名字 -r($tester->getProjectPairsByProductID(1)) && p('21') && e('项目11'); // 返回产品1关联的项目21名字 -r($tester->getProjectPairsByProductID(101)) && p() && e('没有数据'); // 传入不存在的产品 - -r($tester->getAppendProject(15)) && p('15') && e('项目5'); // 返回id为15的项目名 -r($tester->getAppendProject(701)) && p() && e('没有数据'); // 传入不存在的项目id \ No newline at end of file diff --git a/test/model/product_bak/isClickable.php b/test/model/product_bak/isClickable.php deleted file mode 100755 index 2555e3b077..0000000000 --- a/test/model/product_bak/isClickable.php +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env php -isClickable(); -cid=1 -pid=1 - -status为normal,action为close >> true -status为close,action为close >> false -status为normal,action为start >> true -status为close,action为start >> true - -*/ - -$adminTester = new productBox('admin'); - -r($adminTester->testIsClickable(2, 'close')) && p() && e('true'); // status为normal,action为close -r($adminTester->testIsClickable(75, 'close')) && p() && e('false'); // status为close,action为close -r($adminTester->testIsClickable(2, 'start')) && p() && e('true'); // status为normal,action为start -r($adminTester->testIsClickable(75, 'start')) && p() && e('true'); // status为close,action为start \ No newline at end of file diff --git a/test/model/product_bak/update.php b/test/model/product_bak/update.php deleted file mode 100755 index 5dc937d9fc..0000000000 --- a/test/model/product_bak/update.php +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env php -update(); -cid=1 -pid=1 - -测试更新产品名称 >> name,正常产品2,john -测试更新产品代号 >> code,code2,newcode1 -测试更新产品名称和代号 >> name,john,jack;code,newcode1,newcode2 -测试不更改产品名称 >> 没有数据更新 -测试不更改产品代号 >> 没有数据更新 -测试同一项目集下产品名称不能重复 >> 『产品名称』已经有『jack』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -测试同一项目集下产品代号不能重复 >> 『产品代号』已经有『newcode2』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 - -*/ - -function updateObject($module, $objectID, $param = array()) -{ - global $tester; - $objectModel = $tester->loadModel($module); - - $object = $objectModel->getById($objectID); - foreach($object as $field => $value) - { - if(in_array($field, array_keys($param))) - { - $_POST[$field] = $param[$field]; - } - else - { - $_POST[$field] = $value; - } - } - - $change = $objectModel->update($objectID); - if($change == array()) $change = '没有数据更新'; - unset($_POST); - - if(dao::isError()) - { - return dao::getError(); - } - else - { - return $change; - } -} - -$case1 = array('name' => 'john'); -$case2 = array('code' => 'newcode1'); -$case3 = array('name' => 'jack', 'code' => 'newcode2'); -$case4 = array('name' => 'jack'); -$case5 = array('code' => 'newcode2'); -$case6 = array('name' => 'jack'); -$case7 = array('code' => 'newcode2'); - -r(updateObject('product', 2, $case1)) && p('0:field,old,new') && e('name,正常产品2,john'); // 测试更新产品名称 -r(updateObject('product', 2, $case2)) && p('0:field,old,new') && e('code,code2,newcode1'); // 测试更新产品代号 -r(updateObject('product', 2, $case3)) && p('0:field,old,new;1:field,old,new') && e('name,john,jack;code,newcode1,newcode2'); // 测试更新产品名称和代号 -r(updateObject('product', 2, $case4)) && p() && e('没有数据更新'); // 测试不更改产品名称 -r(updateObject('product', 2, $case5)) && p() && e('没有数据更新'); // 测试不更改产品代号 -r(updateObject('product', 13, $case6)) && p('name:0') && e('『产品名称』已经有『jack』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试同一项目集下产品名称不能重复 -r(updateObject('product', 13, $case7)) && p('code:0') && e('『产品代号』已经有『newcode2』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试同一项目集下产品代号不能重复 - -system("./ztest init"); \ No newline at end of file diff --git a/test/model/program/a.txt b/test/model/program/a.txt deleted file mode 100644 index 4b762b4d81..0000000000 --- a/test/model/program/a.txt +++ /dev/null @@ -1,2441 +0,0 @@ -123Array -( - [my] => Array - ( - [0] => stdClass Object - ( - [name] => 项目集3 - [products] => Array - ( - [0] => stdClass Object - ( - [id] => 4 - [program] => 3 - [name] => 正常产品4 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 4 - [id] => 14 - [name] => 项目4 - [status] => doing - [end] => 2022-04-04 - [execution] => stdClass Object - ( - [id] => 644 - [project] => 14 - [name] => 迭代544 - [end] => 2022-04-04 - [hours] => stdClass Object - ( - [totalConsumed] => 6 - [totalEstimate] => 4 - [totalLeft] => 4 - [totalReal] => 10 - [progress] => 60 - ) - - ) - - [hours] => Array - ( - [progress] => 58 - ) - - ) - - [1] => stdClass Object - ( - [product] => 4 - [id] => 24 - [name] => 项目14 - [status] => doing - [end] => 2020-02-14 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 654 - [project] => 24 - [name] => 迭代554 - [end] => 2020-02-14 - [hours] => stdClass Object - ( - [totalConsumed] => 6 - [totalEstimate] => 3 - [totalLeft] => 3 - [totalReal] => 9 - [progress] => 67 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 55 - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [id] => 15 - [program] => 3 - [name] => 正常产品15 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 43 - [product] => 15 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 44 - [product] => 15 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 45 - [product] => 15 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 15 - [id] => 35 - [name] => 项目25 - [status] => wait - [end] => 2019-01-25 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 59 - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [id] => 48 - [program] => 3 - [name] => 多分支产品48 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 142 - [product] => 48 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 143 - [product] => 48 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 144 - [product] => 48 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 48 - [id] => 68 - [name] => 项目58 - [status] => wait - [end] => 2020-10-04 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 698 - [project] => 68 - [name] => 阶段598 - [end] => 2020-10-04 - [hours] => stdClass Object - ( - [totalConsumed] => 10 - [totalEstimate] => 3 - [totalLeft] => 3 - [totalReal] => 13 - [progress] => 77 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 67 - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [id] => 59 - [program] => 3 - [name] => 多分支产品59 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 59 - [id] => 69 - [name] => 项目59 - [status] => doing - [end] => 2021-11-05 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - [1] => stdClass Object - ( - [product] => 59 - [id] => 79 - [name] => 项目69 - [status] => doing - [end] => 2019-09-15 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 68 - ) - - ) - - ) - - ) - - ) - - [4] => stdClass Object - ( - [id] => 81 - [program] => 3 - [name] => 多平台产品81 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 241 - [product] => 81 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 242 - [product] => 81 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 243 - [product] => 81 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 81 - [id] => 11 - [name] => 项目1 - [status] => wait - [end] => 2019-01-01 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 40 - ) - - ) - - [1] => stdClass Object - ( - [product] => 81 - [id] => 91 - [name] => 项目81 - [status] => wait - [end] => 2019-09-27 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 41 - ) - - ) - - ) - - ) - - ) - - [5] => stdClass Object - ( - [id] => 92 - [program] => 3 - [name] => 多平台产品92 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 92 - [id] => 12 - [name] => 项目2 - [status] => wait - [end] => 2020-02-02 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 642 - [project] => 12 - [name] => 迭代542 - [end] => 2020-02-02 - [hours] => stdClass Object - ( - [totalConsumed] => 4 - [totalEstimate] => 2 - [totalLeft] => 2 - [totalReal] => 6 - [progress] => 67 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 51 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 92 - [id] => 22 - [name] => 项目12 - [status] => doing - [end] => 2022-12-12 - [execution] => stdClass Object - ( - [id] => 652 - [project] => 22 - [name] => 迭代552 - [end] => 2022-12-12 - [hours] => stdClass Object - ( - [totalConsumed] => 4 - [totalEstimate] => 1 - [totalLeft] => 0 - [totalReal] => 4 - [progress] => 100 - ) - - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [6] => stdClass Object - ( - [id] => 103 - [program] => 3 - [name] => case4 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 307 - [product] => 103 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 308 - [product] => 103 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 309 - [product] => 103 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [name] => 项目集4 - [products] => Array - ( - [0] => stdClass Object - ( - [id] => 5 - [program] => 4 - [name] => 正常产品5 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 5 - [id] => 15 - [name] => 项目5 - [status] => doing - [end] => 2019-05-05 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [id] => 16 - [program] => 4 - [name] => 正常产品16 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 46 - [product] => 16 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 47 - [product] => 16 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 48 - [product] => 16 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 16 - [id] => 36 - [name] => 项目26 - [status] => wait - [end] => 2020-02-26 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 666 - [project] => 36 - [name] => 迭代566 - [end] => 2020-02-26 - [hours] => stdClass Object - ( - [totalConsumed] => 8 - [totalEstimate] => 4 - [totalLeft] => 4 - [totalReal] => 12 - [progress] => 67 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 65 - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [id] => 49 - [program] => 4 - [name] => 多分支产品49 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 145 - [product] => 49 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 146 - [product] => 49 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 147 - [product] => 49 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 49 - [id] => 59 - [name] => 项目49 - [status] => wait - [end] => 2019-01-22 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 68 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 49 - [id] => 69 - [name] => 项目59 - [status] => doing - [end] => 2021-11-05 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [id] => 60 - [program] => 4 - [name] => 多分支产品60 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 60 - [id] => 70 - [name] => 项目60 - [status] => doing - [end] => 2022-12-06 - [execution] => stdClass Object - ( - [id] => 700 - [project] => 70 - [name] => 阶段600 - [end] => 2022-12-06 - [hours] => stdClass Object - ( - [totalConsumed] => 12 - [totalEstimate] => 5 - [totalLeft] => 0 - [totalReal] => 12 - [progress] => 100 - ) - - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - [1] => stdClass Object - ( - [product] => 60 - [id] => 80 - [name] => 项目70 - [status] => doing - [end] => 2020-10-16 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 620 - [project] => 80 - [name] => 看板520 - [end] => 2022-04-07 - [hours] => stdClass Object - ( - [totalConsumed] => 12 - [totalEstimate] => 2 - [totalLeft] => 2 - [totalReal] => 14 - [progress] => 86 - ) - - ) - - [hours] => Array - ( - [progress] => 73 - ) - - ) - - ) - - ) - - ) - - [4] => stdClass Object - ( - [id] => 82 - [program] => 4 - [name] => 多平台产品82 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 244 - [product] => 82 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 245 - [product] => 82 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 246 - [product] => 82 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 82 - [id] => 12 - [name] => 项目2 - [status] => wait - [end] => 2020-02-02 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 642 - [project] => 12 - [name] => 迭代542 - [end] => 2020-02-02 - [hours] => stdClass Object - ( - [totalConsumed] => 4 - [totalEstimate] => 2 - [totalLeft] => 2 - [totalReal] => 6 - [progress] => 67 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 51 - ) - - ) - - [1] => stdClass Object - ( - [product] => 82 - [id] => 92 - [name] => 项目82 - [status] => wait - [end] => 2020-10-01 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 632 - [project] => 92 - [name] => 看板532 - [end] => 2022-04-19 - [hours] => stdClass Object - ( - [totalConsumed] => 4 - [totalEstimate] => 3 - [totalLeft] => 3 - [totalReal] => 7 - [progress] => 57 - ) - - ) - - [hours] => Array - ( - [progress] => 43 - ) - - ) - - ) - - ) - - ) - - [5] => stdClass Object - ( - [id] => 93 - [program] => 4 - [name] => 多平台产品93 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 93 - [id] => 13 - [name] => 项目3 - [status] => doing - [end] => 2021-03-03 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 51 - ) - - ) - - [1] => stdClass Object - ( - [product] => 93 - [id] => 23 - [name] => 项目13 - [status] => doing - [end] => 2019-01-13 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 56 - ) - - ) - - ) - - ) - - ) - - ) - - ) - - ) - - [others] => Array - ( - [0] => stdClass Object - ( - [name] => 项目集1 - [products] => Array - ( - [0] => stdClass Object - ( - [id] => 2 - [program] => 1 - [name] => jack - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 2 - [id] => 12 - [name] => 项目2 - [status] => wait - [end] => 2020-02-02 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 642 - [project] => 12 - [name] => 迭代542 - [end] => 2020-02-02 - [hours] => stdClass Object - ( - [totalConsumed] => 4 - [totalEstimate] => 2 - [totalLeft] => 2 - [totalReal] => 6 - [progress] => 67 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 51 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 2 - [id] => 22 - [name] => 项目12 - [status] => doing - [end] => 2022-12-12 - [execution] => stdClass Object - ( - [id] => 652 - [project] => 22 - [name] => 迭代552 - [end] => 2022-12-12 - [hours] => stdClass Object - ( - [totalConsumed] => 4 - [totalEstimate] => 1 - [totalLeft] => 0 - [totalReal] => 4 - [progress] => 100 - ) - - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [id] => 13 - [program] => 1 - [name] => jack - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 37 - [product] => 13 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 38 - [product] => 13 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 39 - [product] => 13 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 13 - [id] => 23 - [name] => 项目13 - [status] => doing - [end] => 2019-01-13 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 56 - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [id] => 46 - [program] => 1 - [name] => 多分支产品46 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 136 - [product] => 46 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 137 - [product] => 46 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 138 - [product] => 46 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 46 - [id] => 56 - [name] => 项目46 - [status] => doing - [end] => 2020-10-19 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 686 - [project] => 56 - [name] => 阶段586 - [end] => 2020-10-19 - [hours] => stdClass Object - ( - [totalConsumed] => 8 - [totalEstimate] => 2 - [totalLeft] => 2 - [totalReal] => 10 - [progress] => 80 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 67 - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [id] => 57 - [program] => 1 - [name] => 多分支产品57 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 57 - [id] => 67 - [name] => 项目57 - [status] => wait - [end] => 2019-09-03 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 70 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 57 - [id] => 77 - [name] => 项目67 - [status] => doing - [end] => 2021-07-13 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 64 - ) - - ) - - ) - - ) - - ) - - [4] => stdClass Object - ( - [id] => 90 - [program] => 1 - [name] => 多平台产品90 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 90 - [id] => 20 - [name] => 项目10 - [status] => wait - [end] => 2020-10-10 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 650 - [project] => 20 - [name] => 迭代550 - [end] => 2020-10-10 - [hours] => stdClass Object - ( - [totalConsumed] => 12 - [totalEstimate] => 10 - [totalLeft] => 10 - [totalReal] => 22 - [progress] => 55 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 68 - ) - - ) - - [1] => stdClass Object - ( - [product] => 90 - [id] => 100 - [name] => 项目90 - [status] => wait - [end] => 2020-06-09 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 640 - [project] => 100 - [name] => 看板540 - [end] => 2022-12-27 - [hours] => stdClass Object - ( - [totalConsumed] => 12 - [totalEstimate] => 0 - [totalLeft] => 0 - [totalReal] => 12 - [progress] => 100 - ) - - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [name] => 项目集2 - [products] => Array - ( - [0] => stdClass Object - ( - [id] => 3 - [program] => 2 - [name] => 正常产品3 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 3 - [id] => 13 - [name] => 项目3 - [status] => doing - [end] => 2021-03-03 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 51 - ) - - ) - - [1] => stdClass Object - ( - [product] => 3 - [id] => 23 - [name] => 项目13 - [status] => doing - [end] => 2019-01-13 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 56 - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [id] => 14 - [program] => 2 - [name] => 正常产品14 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 40 - [product] => 14 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 41 - [product] => 14 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 42 - [product] => 14 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 14 - [id] => 24 - [name] => 项目14 - [status] => doing - [end] => 2020-02-14 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 654 - [project] => 24 - [name] => 迭代554 - [end] => 2020-02-14 - [hours] => stdClass Object - ( - [totalConsumed] => 6 - [totalEstimate] => 3 - [totalLeft] => 3 - [totalReal] => 9 - [progress] => 67 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 55 - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [id] => 47 - [program] => 2 - [name] => 多分支产品47 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 139 - [product] => 47 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 140 - [product] => 47 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 141 - [product] => 47 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 47 - [id] => 67 - [name] => 项目57 - [status] => wait - [end] => 2019-09-03 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 70 - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [id] => 58 - [program] => 2 - [name] => 多分支产品58 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 58 - [id] => 68 - [name] => 项目58 - [status] => wait - [end] => 2020-10-04 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 698 - [project] => 68 - [name] => 阶段598 - [end] => 2020-10-04 - [hours] => stdClass Object - ( - [totalConsumed] => 10 - [totalEstimate] => 3 - [totalLeft] => 3 - [totalReal] => 13 - [progress] => 77 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 67 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 58 - [id] => 78 - [name] => 项目68 - [status] => doing - [end] => 2022-08-14 - [execution] => stdClass Object - ( - [id] => 618 - [project] => 78 - [name] => 看板518 - [end] => 2020-02-05 - [hours] => stdClass Object - ( - [totalConsumed] => 10 - [totalEstimate] => 0 - [totalLeft] => 0 - [totalReal] => 10 - [progress] => 100 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 71 - ) - - ) - - ) - - ) - - ) - - [4] => stdClass Object - ( - [id] => 91 - [program] => 2 - [name] => 多平台产品91 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 91 - [id] => 11 - [name] => 项目1 - [status] => wait - [end] => 2019-01-01 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 40 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 91 - [id] => 21 - [name] => 项目11 - [status] => doing - [end] => 2021-11-11 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [name] => 项目集9 - [products] => Array - ( - [0] => stdClass Object - ( - [id] => 10 - [program] => 9 - [name] => 正常产品10 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 28 - [product] => 10 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 29 - [product] => 10 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 30 - [product] => 10 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 10 - [id] => 20 - [name] => 项目10 - [status] => wait - [end] => 2020-10-10 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 650 - [project] => 20 - [name] => 迭代550 - [end] => 2020-10-10 - [hours] => stdClass Object - ( - [totalConsumed] => 12 - [totalEstimate] => 10 - [totalLeft] => 10 - [totalReal] => 22 - [progress] => 55 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 68 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 10 - [id] => 30 - [name] => 项目20 - [status] => doing - [end] => 2022-08-20 - [execution] => stdClass Object - ( - [id] => 660 - [project] => 30 - [name] => 迭代560 - [end] => 2022-08-20 - [hours] => stdClass Object - ( - [totalConsumed] => 12 - [totalEstimate] => 9 - [totalLeft] => 9 - [totalReal] => 21 - [progress] => 57 - ) - - ) - - [hours] => Array - ( - [progress] => 66 - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [id] => 43 - [program] => 9 - [name] => 多分支产品43 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 43 - [id] => 53 - [name] => 项目43 - [status] => doing - [end] => 2021-07-16 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 47 - ) - - ) - - [1] => stdClass Object - ( - [product] => 43 - [id] => 63 - [name] => 项目53 - [status] => doing - [end] => 2019-05-26 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [id] => 54 - [program] => 9 - [name] => 多分支产品54 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 54 - [id] => 64 - [name] => 项目54 - [status] => doing - [end] => 2020-06-27 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 694 - [project] => 64 - [name] => 阶段594 - [end] => 2020-06-27 - [hours] => stdClass Object - ( - [totalConsumed] => 6 - [totalEstimate] => 10 - [totalLeft] => 0 - [totalReal] => 6 - [progress] => 100 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [id] => 87 - [program] => 9 - [name] => 多平台产品87 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 259 - [product] => 87 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 260 - [product] => 87 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 261 - [product] => 87 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - ) - - [4] => stdClass Object - ( - [id] => 98 - [program] => 9 - [name] => 多平台产品98 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 292 - [product] => 98 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 293 - [product] => 98 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 294 - [product] => 98 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 98 - [id] => 28 - [name] => 项目18 - [status] => wait - [end] => 2020-06-18 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 658 - [project] => 28 - [name] => 迭代558 - [end] => 2020-06-18 - [hours] => stdClass Object - ( - [totalConsumed] => 10 - [totalEstimate] => 7 - [totalLeft] => 0 - [totalReal] => 10 - [progress] => 100 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [name] => 项目集10 - [products] => Array - ( - [0] => stdClass Object - ( - [id] => 11 - [program] => 10 - [name] => 正常产品11 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 31 - [product] => 11 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 32 - [product] => 11 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 33 - [product] => 11 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 11 - [id] => 21 - [name] => 项目11 - [status] => doing - [end] => 2021-11-11 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - [1] => stdClass Object - ( - [product] => 11 - [id] => 31 - [name] => 项目21 - [status] => doing - [end] => 2019-09-21 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 35 - ) - - ) - - ) - - ) - - ) - - [1] => stdClass Object - ( - [id] => 44 - [program] => 10 - [name] => 多分支产品44 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 44 - [id] => 54 - [name] => 项目44 - [status] => doing - [end] => 2022-08-17 - [execution] => stdClass Object - ( - [id] => 684 - [project] => 54 - [name] => 阶段584 - [end] => 2022-08-17 - [hours] => stdClass Object - ( - [totalConsumed] => 6 - [totalEstimate] => 0 - [totalLeft] => 0 - [totalReal] => 6 - [progress] => 100 - ) - - ) - - [hours] => Array - ( - [progress] => 55 - ) - - ) - - [1] => stdClass Object - ( - [product] => 44 - [id] => 64 - [name] => 项目54 - [status] => doing - [end] => 2020-06-27 - [delay] => 1 - [execution] => stdClass Object - ( - [id] => 694 - [project] => 64 - [name] => 阶段594 - [end] => 2020-06-27 - [hours] => stdClass Object - ( - [totalConsumed] => 6 - [totalEstimate] => 10 - [totalLeft] => 0 - [totalReal] => 6 - [progress] => 100 - ) - - [delay] => 1 - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [2] => stdClass Object - ( - [id] => 55 - [program] => 10 - [name] => 多分支产品55 - [plans] => Array - ( - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 55 - [id] => 75 - [name] => 项目65 - [status] => wait - [end] => 2019-05-11 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 100 - ) - - ) - - ) - - ) - - ) - - [3] => stdClass Object - ( - [id] => 88 - [program] => 10 - [name] => 多平台产品88 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 262 - [product] => 88 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 263 - [product] => 88 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 264 - [product] => 88 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - ) - - [4] => stdClass Object - ( - [id] => 99 - [program] => 10 - [name] => 多平台产品99 - [plans] => Array - ( - [0] => stdClass Object - ( - [id] => 295 - [product] => 99 - [title] => 1.0 - ) - - [1] => stdClass Object - ( - [id] => 296 - [product] => 99 - [title] => 1.1 - ) - - [2] => stdClass Object - ( - [id] => 297 - [product] => 99 - [title] => 长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#! - ) - - ) - - [releases] => Array - ( - ) - - [projects] => Array - ( - [wait] => Array - ( - [0] => stdClass Object - ( - [product] => 99 - [id] => 19 - [name] => 项目9 - [status] => wait - [end] => 2019-09-09 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 64 - ) - - ) - - ) - - [doing] => Array - ( - [0] => stdClass Object - ( - [product] => 99 - [id] => 29 - [name] => 项目19 - [status] => doing - [end] => 2021-07-19 - [delay] => 1 - [execution] => Array - ( - ) - - [hours] => Array - ( - [progress] => 68 - ) - - ) - - ) - - ) - - ) - - ) - - ) - - ) - -) - \ No newline at end of file diff --git a/test/model/program/move.sh b/test/model/program/move.sh deleted file mode 100644 index 83d843101e..0000000000 --- a/test/model/program/move.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#This script is use to rename files -for file in * ; -do mv $file `echo $file | tr 'A-Z' 'a-z'`; -done diff --git a/test/model/project/move.sh b/test/model/project/move.sh deleted file mode 100644 index 83d843101e..0000000000 --- a/test/model/project/move.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#This script is use to rename files -for file in * ; -do mv $file `echo $file | tr 'A-Z' 'a-z'`; -done diff --git a/test/model/user/authorize.php b/test/model/user/authorize.php old mode 100644 new mode 100755 index 943b4f1a56..dd2254e3ca --- a/test/model/user/authorize.php +++ b/test/model/user/authorize.php @@ -10,6 +10,10 @@ title=userModel->authorizeTest(); cid=1 pid=1 +获取用户的权限,返回权限列表 >> 1 +获取用户的权限,返回权限列表 >> 1 +获取空用户名的权限,返回空 >> 0 + */ $user = new userTest(); @@ -18,4 +22,4 @@ $rights = $user->authorizeTest('test2'); r($rights['rights']) && p('action:comment') && e('1'); //获取用户的权限,返回权限列表 r($rights['rights']) && p('testtask:activate') && e('1'); //获取用户的权限,返回权限列表 r($user->authorizeTest('sadf!!@#a')) && p('projects') && e(''); //获取不存在的用户的权限,返回空 -r($user->authorizeTest('')) && p('') && e('0'); //获取空用户名的权限,返回空 +r($user->authorizeTest('')) && p('') && e('0'); //获取空用户名的权限,返回空 \ No newline at end of file diff --git a/test/model/user/batchcreate.php b/test/model/user/batchcreate.php old mode 100644 new mode 100755 index 6a11f8e31d..2348dd02e7 --- a/test/model/user/batchcreate.php +++ b/test/model/user/batchcreate.php @@ -10,14 +10,8 @@ title=userModel->batchCreateTest(); cid=1 pid=1 -密码较弱的情况 >> 您的密码强度小于系统设定。 -Visions为空的情况 >> 『版本类型』不能为空。 -用户名为空的情况 >> 『用户名』不能为空。 -用户名特殊的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 -两次密码不相同的情况 >> 两次密码应该相同。 -插入重复的用户名,返回报错信息 >> 『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -正常插入用户,返回新插入的ID、真实姓名 >> 1001,新的测试用户 -正常插入用户,返回新插入的真实姓名 >> 新的测试用户 +获取插入的第一个用户的account >> newtestuser1 +获取插入的最后一个用户的realname >> 新测试用户3 */ @@ -33,4 +27,4 @@ $normalUser['password'] = array(1 => 'e10adc3949ba59abbe56e057f20f883e', 2 => 'e r($user->batchCreateUserTest($normalUser)) && p('0:account') && e('newtestuser1'); //获取插入的第一个用户的account r($user->batchCreateUserTest($normalUser)) && p('2:realname') && e('新测试用户3'); //获取插入的最后一个用户的realname -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/batchedit.php b/test/model/user/batchedit.php old mode 100644 new mode 100755 index dc509eaf48..88c35c9071 --- a/test/model/user/batchedit.php +++ b/test/model/user/batchedit.php @@ -10,14 +10,8 @@ title=userModel->batchEditTest(); cid=1 pid=1 -密码较弱的情况 >> 您的密码强度小于系统设定。 -Visions为空的情况 >> 『版本类型』不能为空。 -用户名为空的情况 >> 『用户名』不能为空。 -用户名特殊的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 -两次密码不相同的情况 >> 两次密码应该相同。 -插入重复的用户名,返回报错信息 >> 『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -正常插入用户,返回新插入的ID、真实姓名 >> 1001,新的测试用户 -正常插入用户,返回新插入的真实姓名 >> 新的测试用户 +获取编辑后的第一个用户的account >> newtestuser1 +获取编辑的最后一个用户的真实姓名 >> 新测试用户3 */ @@ -33,4 +27,4 @@ $normalUser['password'] = array(998 => 'e10adc3949ba59abbe56e057f20f883e', 999 = r($user->batchEditUserTest($normalUser)) && p('998:account') && e('newtestuser1'); //获取编辑后的第一个用户的account r($user->batchEditUserTest($normalUser)) && p('1000:realname') && e('新测试用户3'); //获取编辑的最后一个用户的真实姓名 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/checkpassword.php b/test/model/user/checkpassword.php old mode 100644 new mode 100755 index 63ae484b00..9143d3e1ce --- a/test/model/user/checkpassword.php +++ b/test/model/user/checkpassword.php @@ -10,14 +10,10 @@ title=userModel->checkPasswordTest(); cid=1 pid=1 -密码较弱的情况 >> 您的密码强度小于系统设定。 -Visions为空的情况 >> 『版本类型』不能为空。 -用户名为空的情况 >> 『用户名』不能为空。 -用户名特殊的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 +正常的用户密码 >> 无报错 两次密码不相同的情况 >> 两次密码应该相同。 -插入重复的用户名,返回报错信息 >> 『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -正常插入用户,返回新插入的ID、真实姓名 >> 1001,新的测试用户 -正常插入用户,返回新插入的真实姓名 >> 新的测试用户 +密码强度小于系统设定 >> 您的密码强度小于系统设定。 +使用常见简单密码,给出错误提示 >> 密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。 */ @@ -41,4 +37,4 @@ r($user->checkPasswordTest($normalUser)) && p('password') && e('无 r($user->checkPasswordTest($differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->checkPasswordTest($weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码强度小于系统设定 r($user->checkPasswordTest($simplePassword)) && p('password1:0') && e('密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。'); //使用常见简单密码,给出错误提示 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/computepasswordstrengthtest.php b/test/model/user/computepasswordstrengthtest.php new file mode 100755 index 0000000000..39381672e6 --- /dev/null +++ b/test/model/user/computepasswordstrengthtest.php @@ -0,0 +1,27 @@ +#!/usr/bin/env php +computePasswordStrengthTest(); +cid=1 +pid=1 + +获取空密码的强度 >> 0 +获取[123456]密码的强度 >> 0 +获取[qaz123]密码的强度 >> 0 +获取[qaz67911334]密码的强度 >> 1 +获取[ZENFBQfy3xpRarDwG3lN]密码的强度 >> 2 + +*/ + +$user = new userTest(); + +r($user->computePasswordStrengthTest('')) && p() && e('0'); //获取空密码的强度 +r($user->computePasswordStrengthTest('123456')) && p() && e('0'); //获取[123456]密码的强度 +r($user->computePasswordStrengthTest('qaz123')) && p() && e('0'); //获取[qaz123]密码的强度 +r($user->computePasswordStrengthTest('qaz67911334')) && p() && e('1'); //获取[qaz67911334]密码的强度 +r($user->computePasswordStrengthTest('ZENFBQfy3xpRarDwG3lN')) && p() && e('2'); //获取[ZENFBQfy3xpRarDwG3lN]密码的强度 \ No newline at end of file diff --git a/test/model/user/computeuserview.php b/test/model/user/computeuserview.php new file mode 100755 index 0000000000..728e2c77ae --- /dev/null +++ b/test/model/user/computeuserview.php @@ -0,0 +1,31 @@ +#!/usr/bin/env php +computeUserViewTest(); +cid=1 +pid=1 + +获取admin账户可见的前两个项目ID >> ,1,3, +获取admin账户可见的前两个产品ID >> ,1,2, +获取user10账户可见的产品ID >> 99 +用户名传null,则获取当前登录账户的views >> admin + +*/ + +$user = new userTest(); + +$adminViews = $user->computeUserViewTest('admin', true); +$adminProjects = substr($adminViews->projects, 0, 5); +$adminProducts = substr($adminViews->products, 0, 5); + +r($adminProjects) && p() && e(',1,3,'); //获取admin账户可见的前两个项目ID +r($adminProducts) && p() && e(',1,2,'); //获取admin账户可见的前两个产品ID +r($user->computeUserViewTest('user10')) && p('products') && e('99'); //获取user10账户可见的产品ID +r($user->computeUserViewTest('test2')) && p('projects') && e(''); //获取test2账户可见的项目ID +r($user->computeUserViewTest(null)) && p('account') && e('admin'); //用户名传null,则获取当前登录账户的views +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/create.php b/test/model/user/create.php old mode 100644 new mode 100755 index 1a8c0d5779..50ca8882e7 --- a/test/model/user/create.php +++ b/test/model/user/create.php @@ -57,4 +57,4 @@ r($user->createUserTest($differentPassword)) && p('password:0') && e('两次密 r($user->createUserTest($existUser)) && p('account:0') && e('『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //插入重复的用户名,返回报错信息 r($user->createUserTest($normalUser)) && p('id,realname') && e('1001,新的测试用户'); //正常插入用户,返回新插入的ID、真实姓名 r($user->createUserTest($normalUser)) && p('realname') && e('新的测试用户'); //正常插入用户,返回新插入的真实姓名 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/createcontactlist.php b/test/model/user/createcontactlist.php new file mode 100644 index 0000000000..8af810363a --- /dev/null +++ b/test/model/user/createcontactlist.php @@ -0,0 +1,24 @@ +#!/usr/bin/env php +createContactListTest(); +cid=1 +pid=1 + +插入一条联系人列表,获取插入的联系人列表名称 >> 新的列表名称1 +插入一条联系人列表,获取插入的联系人列表名称 >> 新的列表名称2 + +*/ +$user = new userTest(); +$userList = array('admin,test2,user29,assfjg'); + +r($user->createContactListTest('新的列表名称1', $userList)) && p('listName') && e('新的列表名称1'); //插入一条联系人列表,获取插入的联系人列表名称 +r($user->createContactListTest('新的列表名称2', $userList)) && p('listName') && e('新的列表名称2'); //插入一条联系人列表,获取插入的联系人列表名称 +r($user->createContactListTest('新的列表名称3', array())) && p('userList') && e(''); //插入一条联系人列表,获取插入的联系人列表 + +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/deletecontactlist.php b/test/model/user/deletecontactlist.php new file mode 100644 index 0000000000..d7afb2c1e5 --- /dev/null +++ b/test/model/user/deletecontactlist.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +deleteContactListTest(); +cid=1 +pid=1 + +删除ID为1的联系人列表 >> 0 +删除ID为2的联系人列表 >> 0 +删除ID为null的联系人列表 >> 0 +删除ID为1000的联系人列表 >> 0 + +*/ +$user = new userTest(); + +r($user->deleteContactListTest(1)) && p('listName') && e('0'); //删除ID为1的联系人列表 +r($user->deleteContactListTest(2)) && p('listName') && e('0'); //删除ID为2的联系人列表 +r($user->deleteContactListTest(null)) && p('userLsit') && e('0'); //删除ID为null的联系人列表 +r($user->deleteContactListTest(1000)) && p('userList') && e('0'); //删除ID为1000的联系人列表 + +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/getavatarpairs.php b/test/model/user/getavatarpairs.php old mode 100644 new mode 100755 diff --git a/test/model/user/getbyquery.php b/test/model/user/getbyquery.php old mode 100644 new mode 100755 diff --git a/test/model/user/getcommiters.php b/test/model/user/getcommiters.php old mode 100644 new mode 100755 diff --git a/test/model/user/getcontactlistbyid.php b/test/model/user/getcontactlistbyid.php old mode 100644 new mode 100755 index 90e8527170..bdfbc68554 --- a/test/model/user/getcontactlistbyid.php +++ b/test/model/user/getcontactlistbyid.php @@ -10,12 +10,18 @@ title=测试 userModel::getContactListByIDTest(); cid=1 pid=1 +获取ID为1的联系人列表名称 >> 联系人列表1 +获取ID为60的联系人列表创建者 >> admin +获取ID为1000的联系人列表,返回空 >> 0 +获取ID为false的联系人列表,返回空 >> 0 +获取ID为null的联系人列表,返回空 >> 0 + */ $user = new userTest(); -r($user->getContactListByIDTest(1)) && p() && e('0'); // -r($user->getContactListByIDTest(2)) && p() && e('0'); // -r($user->getContactListByIDTest(1000)) && p() && e('0'); // -r($user->getContactListByIDTest(false)) && p() && e('0'); // -r($user->getContactListByIDTest(null)) && p() && e('0'); // +r($user->getContactListByIDTest(1)) && p('listName') && e('联系人列表1'); //获取ID为1的联系人列表名称 +r($user->getContactListByIDTest(60)) && p('account') && e('admin'); //获取ID为60的联系人列表创建者 +r($user->getContactListByIDTest(1000)) && p() && e('0'); //获取ID为1000的联系人列表,返回空 +r($user->getContactListByIDTest(false)) && p() && e('0'); //获取ID为false的联系人列表,返回空 +r($user->getContactListByIDTest(null)) && p() && e('0'); //获取ID为null的联系人列表,返回空 \ No newline at end of file diff --git a/test/model/user/getcontactlists.php b/test/model/user/getcontactlists.php old mode 100644 new mode 100755 index cca7a64b5f..e0566b2eb5 --- a/test/model/user/getcontactlists.php +++ b/test/model/user/getcontactlists.php @@ -10,6 +10,8 @@ title=测试 userModel::getContactListsTest(); cid=1 pid=1 +获取admin的联系人列表 >> 0 + */ $user = new userTest(); $adminContactList1 = $user->getContactListsTest('admin', 'withempty|withnote'); @@ -17,4 +19,4 @@ $adminContactList2 = $user->getContactListsTest('admin', ''); $test2ContactList = $user->getContactListsTest('test2'); $emptyContactList = $user->getContactListsTest('', ''); -r($adminContactList) && p() && e('0'); // 获取admin的联系人列表 +r($adminContactList) && p() && e('0'); // 获取admin的联系人列表 \ No newline at end of file diff --git a/test/model/user/getcontactuserpairs.php b/test/model/user/getcontactuserpairs.php old mode 100644 new mode 100755 index eb3db10ad3..8440daeb33 --- a/test/model/user/getcontactuserpairs.php +++ b/test/model/user/getcontactuserpairs.php @@ -10,8 +10,14 @@ title=userModel->getContactUserPairsTest(); cid=1 pid=1 +根据传入的accountList获取admin真实姓名 >> admin +根据传入的accountList获取test2真实姓名 >> 测试2 + */ $user = new userTest(); -$accountList = array('admin', 'test2'); +$accountList = array('admin', 'test2', 'asdffg', null); -r($user->getContactUserPairsTest($accountList)) && p('') && e(''); // +r($user->getContactUserPairsTest($accountList)) && p('admin') && e('admin'); //根据传入的accountList获取admin真实姓名 +r($user->getContactUserPairsTest($accountList)) && p('test2') && e('测试2'); //根据传入的accountList获取test2真实姓名 +r($user->getContactUserPairsTest($accountList)) && p('asdffg') && e(''); //根据传入的accountList获取asdffg真实姓名 +r($user->getContactUserPairsTest($accountList)) && p('null') && e(''); //根据传入的accountList获取null真实姓名 \ No newline at end of file diff --git a/test/model/user/getdatainjson.php b/test/model/user/getdatainjson.php new file mode 100644 index 0000000000..117cf50b01 --- /dev/null +++ b/test/model/user/getdatainjson.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getDataInJSON(); +cid=1 +pid=1 + +传入admin用户信息,返回公司信息 >> 易软天创网络科技有限公司 +传入admin用户信息,返回用户名信息 >> admin +传入null用户信息,返回公司信息 >> 易软天创网络科技有限公司 + +*/ +$user = new userTest(); + +$admin = new stdclass(); +$admin->id = 1; +$admin->account = 'admin'; +$admin->password = '123456'; +$admin->deleted = '1'; + +r($user->getDataInJSONTest($admin)) && p('user:company') && e('易软天创网络科技有限公司'); //传入admin用户信息,返回公司信息 +r($user->getDataInJSONTest($admin)) && p('user:account') && e('admin'); //传入admin用户信息,返回用户名信息 +r($user->getDataInJSONTest($admin)) && p('user:password') && e(''); //传入admin用户信息,返回密码信息 +r($user->getDataInJSONTest(null)) && p('user:company') && e('易软天创网络科技有限公司'); //传入null用户信息,返回公司信息 \ No newline at end of file diff --git a/test/model/user/getgroups.php b/test/model/user/getgroups.php old mode 100644 new mode 100755 index e8d8ad402d..513c8eb460 --- a/test/model/user/getgroups.php +++ b/test/model/user/getgroups.php @@ -10,9 +10,13 @@ title=测试 userModel::getGroupsTest(); cid=1 pid=1 +获取admin所在的分组,为空 >> 0 +通过test2所在的分组数量,1个 >> 1 +传空用户名,返回空 >> 0 + */ $user = new userTest(); r($user->getGroupsTest('admin')) && p() && e('0'); // 获取admin所在的分组,为空 r(count($user->getGroupsTest('test2'))) && p() && e('1'); // 通过test2所在的分组数量,1个 -r($user->getGroupsTest('')) && p() && e('0'); // 传空用户名,返回空 +r($user->getGroupsTest('')) && p() && e('0'); // 传空用户名,返回空 \ No newline at end of file diff --git a/test/model/user/getgroupsbyvisions.php b/test/model/user/getgroupsbyvisions.php old mode 100644 new mode 100755 index c16e6e3d27..cb7998f81f --- a/test/model/user/getgroupsbyvisions.php +++ b/test/model/user/getgroupsbyvisions.php @@ -10,10 +10,15 @@ title=测试 userModel::getGroupsByVisionsTest(); cid=1 pid=1 +获取系统中所有研发界面分组的数量 >> 14 +获取系统中所有迅捷界面分组的数量 >> 3 +传空Visions,返回空数组 >> 0 +获取系统中所有用户分组的数量 >> 17 + */ $user = new userTest(); r(count($user->getGroupsByVisionsTest(array('rnd')))) && p() && e('14'); // 获取系统中所有研发界面分组的数量 r(count($user->getGroupsByVisionsTest(array('lite')))) && p() && e('3'); // 获取系统中所有迅捷界面分组的数量 r($user->getGroupsByVisionsTest(array())) && p() && e('0'); // 传空Visions,返回空数组 -r(count($user->getGroupsByVisionsTest(array('rnd','lite')))) && p() && e('17'); // 获取系统中所有用户分组的数量 +r(count($user->getGroupsByVisionsTest(array('rnd','lite')))) && p() && e('17'); // 获取系统中所有用户分组的数量 \ No newline at end of file diff --git a/test/model/user/getlist.php b/test/model/user/getlist.php old mode 100644 new mode 100755 diff --git a/test/model/user/getlistbyaccount.php b/test/model/user/getlistbyaccount.php old mode 100644 new mode 100755 index df5cec6540..d5c4294612 --- a/test/model/user/getlistbyaccount.php +++ b/test/model/user/getlistbyaccount.php @@ -10,6 +10,10 @@ title=测试 userModel::getListByAccount(); cid=1 pid=1 +获取admin的联系人列表 >> 0 +获取admin的联系人列表 >> 0 +获取admin的联系人列表 >> 0 + */ $user = new userTest(); $adminContactList = $user->getListByAccountTest('admin'); @@ -18,4 +22,4 @@ $emptyContactList = $user->getListByAccountTest(''); r($adminContactList) && p() && e('0'); // 获取admin的联系人列表 r($test2ContactList) && p() && e('0'); // 获取admin的联系人列表 -r($emptyContactList) && p() && e('0'); // 获取admin的联系人列表 +r($emptyContactList) && p() && e('0'); // 获取admin的联系人列表 \ No newline at end of file diff --git a/test/model/user/getlistbyaccounts.php b/test/model/user/getlistbyaccounts.php old mode 100644 new mode 100755 diff --git a/test/model/user/getobjects.php b/test/model/user/getobjects.php old mode 100644 new mode 100755 index d01c0f9344..d814c4c8ec --- a/test/model/user/getobjects.php +++ b/test/model/user/getobjects.php @@ -10,6 +10,13 @@ title=测试 userModel::getObjectsTest(); cid=1 pid=1 +获取admin的所属项目列表,取ID为11的项目名字 >> 项目1 +获取admin的所属项目列表,取ID为11的项目类型 >> project +获取admin的所属执行列表,取ID为120的项目名字 >> 迭代20 +获取admin的已完成的所属项目列表,返回空 >> 0 +获取test2用户的所属项目列表,返回空 >> 0 +传入一个空用户名字段,返回空 >> 0 + */ $user = new userTest(); $adminProjects = $user->getObjectsTest('admin', 'project', 'all', 'id_desc'); @@ -23,4 +30,4 @@ r($adminProjects) && p('11:type') && e('project'); //获取admin的所属 r($adminExecutions) && p('120:name') && e('迭代20'); //获取admin的所属执行列表,取ID为120的项目名字 r($adminDoneProjects) && p('') && e('0'); //获取admin的已完成的所属项目列表,返回空 r($test2Projects) && p('') && e('0'); //获取test2用户的所属项目列表,返回空 -r($emptyUser) && p('') && e('0'); //传入一个空用户名字段,返回空 +r($emptyUser) && p('') && e('0'); //传入一个空用户名字段,返回空 \ No newline at end of file diff --git a/test/model/user/getpairs.php b/test/model/user/getpairs.php old mode 100644 new mode 100755 diff --git a/test/model/user/getparentstageauthedusers.php b/test/model/user/getparentstageauthedusers.php old mode 100644 new mode 100755 index 8cf13abcc5..08c4905f95 --- a/test/model/user/getparentstageauthedusers.php +++ b/test/model/user/getparentstageauthedusers.php @@ -10,10 +10,15 @@ title=测试 userModel::getParentStageAuthedUsersTest(); cid=1 pid=1 +传入ID为0的情况获取有权限的用户 >> 0 +传入一个阶段ID获取有权限的用户 >> admin +传入一个项目集ID获取有权限的用户 >> 0 +传入一个看板类型的项目ID获取有权限的用户 >> admin + */ $user = new userTest(); r($user->getParentStageAuthedUsersTest(0)) && p() && e('0'); //传入ID为0的情况获取有权限的用户 -r($user->getParentStageAuthedUsersTest(131)) && p('wwccss') && e('wwccss'); //传入一个阶段ID获取有权限的用户 +r($user->getParentStageAuthedUsersTest(131)) && p('admin') && e('admin'); //传入一个阶段ID获取有权限的用户 r($user->getParentStageAuthedUsersTest(1)) && p() && e('0'); //传入一个项目集ID获取有权限的用户 -r($user->getParentStageAuthedUsersTest(161)) && p('wwccss') && e('wwccss'); //传入一个看板类型的项目ID获取有权限的用户 +r($user->getParentStageAuthedUsersTest(161)) && p('admin') && e('admin'); //传入一个看板类型的项目ID获取有权限的用户 \ No newline at end of file diff --git a/test/model/user/getproductmembers.php b/test/model/user/getproductmembers.php new file mode 100755 index 0000000000..91d93393ad --- /dev/null +++ b/test/model/user/getproductmembers.php @@ -0,0 +1,32 @@ +#!/usr/bin/env php +getProductMembersTest(); +cid=1 +pid=1 + +获取ID为1的产品的团队成员,判断是否包含pm92 >> pm92 +获取ID为4的产品的团队成员,判断是否包含user5 >> user5 +获取ID为2的产品的干系人,判断是否包含po3 >> po3 +获取ID为3的产品的干系人,判断是否包含user14 >> user14 + +*/ + +$user = new userTest(); +$products = array(1 => 1, 2 => 2, 3 => 3, 4 => 4); + +$members = $user->getProductMembersTest($products); +$teamGroups = $members[0]; +$stakeholderGroups = $members[0]; + +r($teamGroups) && p('1:pm92') && e('pm92'); //获取ID为1的产品的团队成员,判断是否包含pm92 +r($teamGroups) && p('4:user5') && e('user5'); //获取ID为4的产品的团队成员,判断是否包含user5 +r($stakeholderGroups) && p('2:po3') && e('po3'); //获取ID为2的产品的干系人,判断是否包含po3 +r($stakeholderGroups) && p('3:user14') && e('user14'); //获取ID为3的产品的干系人,判断是否包含user14 + +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/getrealnameandemails.php b/test/model/user/getrealnameandemails.php old mode 100644 new mode 100755 diff --git a/test/model/user/getuserdisplayinfos.php b/test/model/user/getuserdisplayinfos.php old mode 100644 new mode 100755 diff --git a/test/model/user/getuserroles.php b/test/model/user/getuserroles.php old mode 100644 new mode 100755 diff --git a/test/model/user/getweakusers.php b/test/model/user/getweakusers.php new file mode 100644 index 0000000000..876e09d912 --- /dev/null +++ b/test/model/user/getweakusers.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +getWeakUsersTest(); +cid=1 +pid=1 + +获取密码较弱的用户 >> 0 + +*/ +$user = new userTest(); +a($user->getWeakUsersTest());die; + +r($user->getWeakUsersTest()) && p('') && e('0'); //获取密码较弱的用户 \ No newline at end of file diff --git a/test/model/user/identify.php b/test/model/user/identify.php old mode 100644 new mode 100755 index 151821e18b..8bbbd7c80a --- a/test/model/user/identify.php +++ b/test/model/user/identify.php @@ -10,10 +10,14 @@ title=userModel->identifyTest(); cid=1 pid=1 +用户名密码皆正确,返回验证登录的用户 >> admin +验证一个不存在的用户,返回空 >> 0 +验证一个不传用户名和密码的用户,返回空 >> 0 + */ $user = new userTest(); r($user->identifyTest('admin', '78302615c8b79cac8df6d2607f8a83ee')) && p('realname') && e('admin'); //用户名密码皆正确,返回验证登录的用户 r($user->identifyTest('asdjaf12', '78302615c8b79cac8df6d2607f8a83ee')) && p() && e('0'); //验证一个不存在的用户,返回空 -r($user->identifyTest('', '')) && p() && e('0'); //验证一个不传用户名和密码的用户,返回空 +r($user->identifyTest('', '')) && p() && e('0'); //验证一个不传用户名和密码的用户,返回空 \ No newline at end of file diff --git a/test/model/user/login.php b/test/model/user/login.php old mode 100644 new mode 100755 index 94e54668d0..e7153b6034 --- a/test/model/user/login.php +++ b/test/model/user/login.php @@ -10,6 +10,10 @@ title=userModel->loginTest(); cid=1 pid=1 +使用admin登录,返回此用户为超级管理员 >> 1 +使用Admin登录,返回权限列表的数量 >> 3 +使用空账号登录,返回权限列表数量为0 >> 0 + */ $userClass = new userTest(); @@ -26,4 +30,4 @@ $emptyAccount = $userClass->loginTest($emptyAccount); r($admin) && p('admin') && e('1'); //使用admin登录,返回此用户为超级管理员 r(count($admin->rights)) && p() && e('3'); //使用Admin登录,返回权限列表的数量 -r(count($emptyAccount->group)) && p() && e('0'); //使用空账号登录,返回权限列表数量为0 +r(count($emptyAccount->group)) && p() && e('0'); //使用空账号登录,返回权限列表数量为0 \ No newline at end of file diff --git a/test/model/user/resetpassword.php b/test/model/user/resetpassword.php old mode 100644 new mode 100755 index ab0ec41dd5..021425e251 --- a/test/model/user/resetpassword.php +++ b/test/model/user/resetpassword.php @@ -10,14 +10,10 @@ title=userModel->resetPasswordTest(); cid=1 pid=1 -密码较弱的情况 >> 您的密码强度小于系统设定。 -Visions为空的情况 >> 『版本类型』不能为空。 -用户名为空的情况 >> 『用户名』不能为空。 -用户名特殊的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 +重设用户密码,返回重设后的加密后的密码 >> 367ef140036b0feb2f90d70d33255eea 两次密码不相同的情况 >> 两次密码应该相同。 -插入重复的用户名,返回报错信息 >> 『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -正常插入用户,返回新插入的ID、真实姓名 >> 1001,新的测试用户 -正常插入用户,返回新插入的真实姓名 >> 新的测试用户 +密码强度小于系统设定 >> 您的密码强度小于系统设定。 +使用常见简单密码,给出错误提示 >> 密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。 */ @@ -42,4 +38,4 @@ r($user->resetPasswordTest($normalUser)) && p('password') && e('367ef r($user->resetPasswordTest($differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->resetPasswordTest($weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码强度小于系统设定 r($user->resetPasswordTest($simplePassword)) && p('password1:0') && e('密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。'); //使用常见简单密码,给出错误提示 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/update.php b/test/model/user/update.php old mode 100644 new mode 100755 index 204a6d2718..b0d51613e3 --- a/test/model/user/update.php +++ b/test/model/user/update.php @@ -10,14 +10,10 @@ title=userModel->updateUserTest(); cid=1 pid=1 -密码较弱的情况 >> 您的密码强度小于系统设定。 -Visions为空的情况 >> 『版本类型』不能为空。 -用户名为空的情况 >> 『用户名』不能为空。 -用户名特殊的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 +编辑用户,返回新的用户名 >> newtestuser4 +编辑用户,有重名用户的情况 >> 『用户名』已经有『newtestuser4』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 两次密码不相同的情况 >> 两次密码应该相同。 -插入重复的用户名,返回报错信息 >> 『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -正常插入用户,返回新插入的ID、真实姓名 >> 1001,新的测试用户 -正常插入用户,返回新插入的真实姓名 >> 新的测试用户 +用户名包含特殊字符的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 */ @@ -44,4 +40,4 @@ r($user->updateUserTest(1000, $normalUser)) && p('account') && e('new r($user->updateUserTest(1000, $existUser)) && p('account:0') && e('『用户名』已经有『newtestuser4』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。');//编辑用户,有重名用户的情况 r($user->updateUserTest(1000, $differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->updateUserTest(1000, $specialUser)) && p('account:0') && e('『用户名』只能是字母、数字或下划线的组合三位以上。'); //用户名包含特殊字符的情况 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/updatecontactList.php b/test/model/user/updatecontactList.php new file mode 100644 index 0000000000..6ca6649ded --- /dev/null +++ b/test/model/user/updatecontactList.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +updateContactList(); +cid=1 +pid=1 + +更新ID为1的联系人列表,获取更新的联系人列表名称 >> 新的列表名称1 +更新ID为2的联系人列表,获取更新的联系人列表名称 >> 新的列表名称2 +更新ID为1000的联系人列表,获取更新的联系人列表 >> 0 + +*/ +$user = new userTest(); +$userList = array('admin,test2,user29,assfjg'); + +r($user->updateContactListTest(1, '新的列表名称1', $userList)) && p('listName') && e('新的列表名称1'); //更新ID为1的联系人列表,获取更新的联系人列表名称 +r($user->updateContactListTest(2, '新的列表名称2', $userList)) && p('listName') && e('新的列表名称2'); //更新ID为2的联系人列表,获取更新的联系人列表名称 +r($user->updateContactListTest(3, '新的列表名称3', '')) && p('userLsit') && e(''); //更新ID为3的联系人列表,获取更新的联系人列表 +r($user->updateContactListTest(1000, '新的列表名称4', $userList)) && p('userList') && e('0'); //更新ID为1000的联系人列表,获取更新的联系人列表 + +system("./ztest init"); \ No newline at end of file diff --git a/test/model/user/updatepassword.php b/test/model/user/updatepassword.php old mode 100644 new mode 100755 index 9e60a05a12..b78d289c7f --- a/test/model/user/updatepassword.php +++ b/test/model/user/updatepassword.php @@ -10,14 +10,9 @@ title=userModel->updatePasswordTest(); cid=1 pid=1 -密码较弱的情况 >> 您的密码强度小于系统设定。 -Visions为空的情况 >> 『版本类型』不能为空。 -用户名为空的情况 >> 『用户名』不能为空。 -用户名特殊的情况 >> 『用户名』只能是字母、数字或下划线的组合三位以上。 +编辑用户密码,返回编辑后的密码 >> dcf859ce8dd8f998bdfe4ae6c22c329e 两次密码不相同的情况 >> 两次密码应该相同。 -插入重复的用户名,返回报错信息 >> 『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -正常插入用户,返回新插入的ID、真实姓名 >> 1001,新的测试用户 -正常插入用户,返回新插入的真实姓名 >> 新的测试用户 +密码小于设定强度的情况 >> 您的密码强度小于系统设定。 */ @@ -38,4 +33,4 @@ r($user->updatePasswordTest(1000, $normalUser)) && p('password') && e r($user->updatePasswordTest(1000, $differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->updatePasswordTest(1000, $weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码小于设定强度的情况 -system("./ztest init"); +system("./ztest init"); \ No newline at end of file diff --git a/test/runtime.zip b/test/runtime.zip deleted file mode 100644 index 26675d9438..0000000000 Binary files a/test/runtime.zip and /dev/null differ