* Add auto test of kanban.
This commit is contained in:
+166
-33
@@ -249,31 +249,86 @@ class kanbanTest
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get kanban data.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getKanbanDataTest($kanbanID)
|
||||
{
|
||||
$objects = $this->objectModel->getKanbanData($kanbanID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$columnCount = 0;
|
||||
$laneCount = 0;
|
||||
$cardCount = 0;
|
||||
foreach($objects as $regions)
|
||||
{
|
||||
foreach($regions->groups as $group)
|
||||
{
|
||||
foreach($group->lanes as $lane) $cardCount += count($lane->items);
|
||||
|
||||
$columnCount += count($group->columns);
|
||||
$laneCount += count($group->lanes);
|
||||
}
|
||||
}
|
||||
return 'columns:' . $columnCount . ', lanes:' . $laneCount . ', cards:' . $cardCount;
|
||||
}
|
||||
|
||||
public function getPlanKanbanTest($product, $branchID = 0, $planGroup = '')
|
||||
/**
|
||||
* Test get plan kanban.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getPlanKanbanTest($productID, $branchID = 0)
|
||||
{
|
||||
$objects = $this->objectModel->getPlanKanban($product, $branchID = 0, $planGroup = '');
|
||||
global $tester;
|
||||
$product = $tester->loadModel('product')->getByID($productID);
|
||||
|
||||
$tester->loadModel('productplan');
|
||||
$planGroup = $product->type == 'normal' ? $tester->productplan->getList($product->id, 0, 'all', '', 'begin_desc', 'skipparent') : $tester->productplan->getGroupByProduct($product->id, 'skipParent', '', 'begin_desc');
|
||||
|
||||
$objects = $this->objectModel->getPlanKanban($product, $branchID, $planGroup);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$laneCount = 0;
|
||||
$cardCount = 0;
|
||||
foreach($objects->lanes as $lane)
|
||||
{
|
||||
foreach($lane->items as $item) $cardCount += count($item);
|
||||
}
|
||||
return 'lanes:' . count($objects->lanes) . ', cards:' . $cardCount;
|
||||
}
|
||||
|
||||
public function getRDKanbanTest($executionID, $browseType = 'all', $orderBy = 'id_desc', $regionID = 0, $groupBy = 'default')
|
||||
public function getRDKanbanTest($executionID, $browseType = 'all', $regionID = 0)
|
||||
{
|
||||
$objects = $this->objectModel->getRDKanban($executionID, $browseType = 'all', $orderBy = 'id_desc', $regionID = 0, $groupBy = 'default');
|
||||
$objects = $this->objectModel->getRDKanban($executionID, $browseType, 'id_desc', $regionID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$columnCount = 0;
|
||||
$laneCount = 0;
|
||||
$cardCount = 0;
|
||||
foreach($objects as $regions)
|
||||
{
|
||||
foreach($regions->groups as $group)
|
||||
{
|
||||
$columnCount += count($group->columns);
|
||||
$laneCount += count($group->lanes);
|
||||
foreach($group->lanes as $lane)
|
||||
{
|
||||
foreach($lane->items as $item) $cardCount += count($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 'columns:' . $columnCount . ', lanes:' . $laneCount . ', cards:' . $cardCount;
|
||||
}
|
||||
|
||||
public function getRegionByIDTest($regionID)
|
||||
@@ -294,13 +349,20 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get kanban id by region id.
|
||||
*
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getKanbanIDByRegionTest($regionID)
|
||||
{
|
||||
$objects = $this->objectModel->getKanbanIDByRegion($regionID);
|
||||
$object = $this->objectModel->getKanbanIDByRegion($regionID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -324,20 +386,31 @@ class kanbanTest
|
||||
|
||||
public function getLaneGroupByRegionsTest($regions, $browseType = 'all')
|
||||
{
|
||||
$objects = $this->objectModel->getLaneGroupByRegions($regions, $browseType = 'all');
|
||||
$objects = $this->objectModel->getLaneGroupByRegions($regions, $browseType);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$count = 0;
|
||||
foreach($objects as $object) $count += count($object);
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get lane pairs by group id.
|
||||
*
|
||||
* @param int $groupID
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getLanePairsByGroupTest($groupID, $orderBy = '`order`_asc')
|
||||
{
|
||||
$objects = $this->objectModel->getLanePairsByGroup($groupID, $orderBy = '`order`_asc');
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$names = implode(',', $objects);
|
||||
return $names;
|
||||
}
|
||||
|
||||
public function getColumnGroupByRegionsTest($regions, $order = 'order')
|
||||
@@ -376,13 +449,23 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get RD column group by regions.
|
||||
*
|
||||
* @param int $regions
|
||||
* @param array $groupIDList
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getRDColumnGroupByRegionsTest($regions, $groupIDList = array())
|
||||
{
|
||||
$objects = $this->objectModel->getRDColumnGroupByRegions($regions, $groupIDList = array());
|
||||
$objects = $this->objectModel->getRDColumnGroupByRegions($regions, $groupIDList);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$count = 0;
|
||||
foreach($objects as $object) $count += count($object);
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -431,10 +514,7 @@ class kanbanTest
|
||||
{
|
||||
foreach($types['lanes'] as $lane)
|
||||
{
|
||||
foreach($lane['cards'] as $card)
|
||||
{
|
||||
$cardCount += count($card);
|
||||
}
|
||||
foreach($lane['cards'] as $card) $cardCount += count($card);
|
||||
}
|
||||
$columnCount += count($types['columns']);
|
||||
$laneCount += count($types['lanes']);
|
||||
@@ -458,26 +538,46 @@ class kanbanTest
|
||||
if(empty($objects))
|
||||
{
|
||||
$this->objectModel->createExecutionLane($executionID, $browseType, $groupBy);
|
||||
$objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
|
||||
$objects = $this->objectModel->getKanban4Group($executionID, $browseType, $groupBy);
|
||||
}
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
$laneCount = 0;
|
||||
foreach($objects as $types)
|
||||
{
|
||||
$laneCount += count($types['lanes']);
|
||||
}
|
||||
foreach($objects as $types) $laneCount += count($types['lanes']);
|
||||
|
||||
return 'lanes:' . $laneCount;
|
||||
}
|
||||
|
||||
public function getLanes4GroupTest($executionID, $browseType, $groupBy, $cardList)
|
||||
/**
|
||||
* Test get kanban for group view.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $groupBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getLanes4GroupTest($executionID, $browseType, $groupBy)
|
||||
{
|
||||
global $tester;
|
||||
/* Get group objects. */
|
||||
if($browseType == 'story') $cardList = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory');
|
||||
if($browseType == 'bug') $cardList = $tester->loadModel('bug')->getExecutionBugs($executionID);
|
||||
if($browseType == 'task') $cardList = $tester->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
$objects = $this->objectModel->getLanes4Group($executionID, $browseType, $groupBy, $cardList);
|
||||
|
||||
if(empty($objects))
|
||||
{
|
||||
$this->objectModel->createExecutionLane($executionID, $browseType, $groupBy);
|
||||
$objects = $this->objectModel->getLanes4Group($executionID, $browseType, $groupBy);
|
||||
}
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$names = '';
|
||||
foreach($objects as $object) $names .= ',' . $object->name;
|
||||
return $names;
|
||||
}
|
||||
|
||||
public function getSpaceListTest($browseType, $pager = null)
|
||||
@@ -498,13 +598,21 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getKanbanPairsTest()
|
||||
/**
|
||||
* Test get Kanban pairs.
|
||||
*
|
||||
* @param string $user
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getKanbanPairsTest($user)
|
||||
{
|
||||
su($user);
|
||||
$objects = $this->objectModel->getKanbanPairs();
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -556,22 +664,39 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get lane pairs by region id.
|
||||
*
|
||||
* @param int $regionID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getLanePairsByRegionTest($regionID, $type = 'all')
|
||||
{
|
||||
$objects = $this->objectModel->getLanePairsByRegion($regionID, $type = 'all');
|
||||
$objects = $this->objectModel->getLanePairsByRegion($regionID, $type);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$names = implode(',', $objects);
|
||||
return $names;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get lane group by regionid.
|
||||
*
|
||||
* @param int $regionID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getLaneGroupByRegionTest($regionID, $type = 'all')
|
||||
{
|
||||
$objects = $this->objectModel->getLaneGroupByRegion($regionID, $type = 'all');
|
||||
$objects = $this->objectModel->getLaneGroupByRegion($regionID, $type);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects[$regionID]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1116,13 +1241,20 @@ class kanbanTest
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get lane by id.
|
||||
*
|
||||
* @param int $laneID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getLaneByIdTest($laneID)
|
||||
{
|
||||
$objects = $this->objectModel->getLaneById($laneID);
|
||||
$object = $this->objectModel->getLaneById($laneID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return $object;
|
||||
}
|
||||
|
||||
public function getObjectGroupTest($executionID, $type, $groupBy)
|
||||
@@ -1131,6 +1263,7 @@ class kanbanTest
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
$objects = implode(',', $objects);
|
||||
return $objects;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ pid=1
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
$userList = array('admin', 'po1', 'po2', 'user1', 'user2', 'pm1', 'pm2');
|
||||
$userList = array('admin', 'po1', 'po2', 'user1', 'user2', 'pm1', 'pm2');
|
||||
$objectType = array('kanban', 'kanbanspace');
|
||||
$paramList = array('noclosed', 'private', 'cooperation', 'public', 'involved');
|
||||
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getKanbanData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getKanbanDataTest($kanbanIDList[0])) && p() && e('columns:4, lanes:1, cards:4'); // 测试获取kanban1的视图
|
||||
r($kanban->getKanbanDataTest($kanbanIDList[1])) && p() && e('columns:4, lanes:1, cards:4'); // 测试获取kanban2的视图
|
||||
r($kanban->getKanbanDataTest($kanbanIDList[2])) && p() && e('columns:4, lanes:1, cards:4'); // 测试获取kanban3的视图
|
||||
r($kanban->getKanbanDataTest($kanbanIDList[3])) && p() && e('columns:4, lanes:1, cards:4'); // 测试获取kanban4的视图
|
||||
r($kanban->getKanbanDataTest($kanbanIDList[4])) && p() && e('columns:4, lanes:1, cards:4'); // 测试获取kanban5的视图
|
||||
r($kanban->getKanbanDataTest($kanbanIDList[5])) && p() && e('columns:0, lanes:0, cards:0'); // 测试获取不存在的kanban的视图
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getKanbanIDByRegion();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$regionIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getKanbanIDByRegionTest($regionIDList[0])) && p() && e('1'); // 测试通过区域1获取看板id
|
||||
r($kanban->getKanbanIDByRegionTest($regionIDList[1])) && p() && e('2'); // 测试通过区域2获取看板id
|
||||
r($kanban->getKanbanIDByRegionTest($regionIDList[2])) && p() && e('3'); // 测试通过区域3获取看板id
|
||||
r($kanban->getKanbanIDByRegionTest($regionIDList[3])) && p() && e('4'); // 测试通过区域4获取看板id
|
||||
r($kanban->getKanbanIDByRegionTest($regionIDList[4])) && p() && e('5'); // 测试通过区域5获取看板id
|
||||
r($kanban->getKanbanIDByRegionTest($regionIDList[5])) && p() && e('0'); // 测试通过不存在的区域获取看板id
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getKanbanPairs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$userList = array('admin', 'po1', 'po2', 'user1', 'user2', 'pm1', 'pm2');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getKanbanPairsTest($userList[0])) && p() && e('100'); //获取用户admin可以看到的看板pairs
|
||||
r($kanban->getKanbanPairsTest($userList[1])) && p() && e('32'); //获取用户po1可以看到的看板pairs
|
||||
r($kanban->getKanbanPairsTest($userList[2])) && p() && e('32'); //获取用户po2可以看到的看板pairs
|
||||
r($kanban->getKanbanPairsTest($userList[3])) && p() && e('32'); //获取用户user1可以看到的看板pairs
|
||||
r($kanban->getKanbanPairsTest($userList[4])) && p() && e('32'); //获取用户user2可以看到的看板pairs
|
||||
r($kanban->getKanbanPairsTest($userList[5])) && p() && e('32'); //获取用户pm1可以看到的看板pairs
|
||||
r($kanban->getKanbanPairsTest($userList[6])) && p() && e('32'); //获取用户pm2可以看到的看板pairs
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getLaneById();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$laneIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getLaneByIdTest($laneIDList[0])) && p('name,type,region,group') && e('默认泳道,common,1,1'); // 测试通过id1获取泳道信息
|
||||
r($kanban->getLaneByIdTest($laneIDList[1])) && p('name,type,region,group') && e('默认泳道,common,2,2'); // 测试通过id2获取泳道信息
|
||||
r($kanban->getLaneByIdTest($laneIDList[2])) && p('name,type,region,group') && e('默认泳道,common,3,3'); // 测试通过id3获取泳道信息
|
||||
r($kanban->getLaneByIdTest($laneIDList[3])) && p('name,type,region,group') && e('默认泳道,common,4,4'); // 测试通过id4获取泳道信息
|
||||
r($kanban->getLaneByIdTest($laneIDList[4])) && p('name,type,region,group') && e('默认泳道,common,5,5'); // 测试通过id5获取泳道信息
|
||||
r($kanban->getLaneByIdTest($laneIDList[5])) && p('name,type,region,group') && e('0'); // 测试通过不存在的id获取泳道信息
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getLaneGroupByRegion();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$regionIDList = array('101', '102', '103', '104', '105', '1000001');
|
||||
$type = array('bug', 'task', 'story');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[0])) && p() && e('3'); // 测试获取区域101的泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[0], $type[0])) && p() && e('1'); // 测试获取区域101的bug泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[0], $type[1])) && p() && e('1'); // 测试获取区域101的task泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[0], $type[2])) && p() && e('1'); // 测试获取区域101的story泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[1])) && p() && e('3'); // 测试获取区域102的泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[1], $type[0])) && p() && e('1'); // 测试获取区域102的bug泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[1], $type[1])) && p() && e('1'); // 测试获取区域102的task泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[1], $type[2])) && p() && e('1'); // 测试获取区域102的story泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[2])) && p() && e('3'); // 测试获取区域103的泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[2], $type[0])) && p() && e('1'); // 测试获取区域103的bug泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[2], $type[1])) && p() && e('1'); // 测试获取区域103的task泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[2], $type[2])) && p() && e('1'); // 测试获取区域103的story泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[3])) && p() && e('3'); // 测试获取区域104的泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[3], $type[0])) && p() && e('1'); // 测试获取区域104的bug泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[3], $type[1])) && p() && e('1'); // 测试获取区域104的task泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[3], $type[2])) && p() && e('1'); // 测试获取区域104的story泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[4])) && p() && e('3'); // 测试获取区域105的泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[4], $type[0])) && p() && e('1'); // 测试获取区域105的bug泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[4], $type[1])) && p() && e('1'); // 测试获取区域105的task泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[4], $type[2])) && p() && e('1'); // 测试获取区域105的story泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[5])) && p() && e('0'); // 测试获取不存在的区域的泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[5], $type[0])) && p() && e('0'); // 测试获取不存在的区域的bug泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[5], $type[1])) && p() && e('0'); // 测试获取不存在的区域的task泳道
|
||||
r($kanban->getLaneGroupByRegionTest($regionIDList[5], $type[2])) && p() && e('0'); // 测试获取不存在的区域的story泳道
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getLaneGroupByRegions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$regionsList = array('101,102,103', '104,105,106', '107,108,109', '110,111,112', '113,114,115', '1000001');
|
||||
$type = array('bug', 'task', 'story');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[0])) && p() && e('9'); // 测试获取区域101,102,103的泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[0], $type[0])) && p() && e('3'); // 测试获取区域101,102,103的bug泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[0], $type[1])) && p() && e('3'); // 测试获取区域101,102,103的task泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[0], $type[2])) && p() && e('3'); // 测试获取区域101,102,103的story泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[1])) && p() && e('9'); // 测试获取区域104,105,106的泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[1], $type[0])) && p() && e('3'); // 测试获取区域104,105,106的bug泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[1], $type[1])) && p() && e('3'); // 测试获取区域104,105,106的task泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[1], $type[2])) && p() && e('3'); // 测试获取区域104,105,106的story泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[2])) && p() && e('9'); // 测试获取区域107,108,109的泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[2], $type[0])) && p() && e('3'); // 测试获取区域107,108,109的bug泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[2], $type[1])) && p() && e('3'); // 测试获取区域107,108,109的task泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[2], $type[2])) && p() && e('3'); // 测试获取区域107,108,109的story泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[3])) && p() && e('9'); // 测试获取区域110,111,112的泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[3], $type[0])) && p() && e('3'); // 测试获取区域110,111,112的bug泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[3], $type[1])) && p() && e('3'); // 测试获取区域110,111,112的task泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[3], $type[2])) && p() && e('3'); // 测试获取区域110,111,112的story泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[4])) && p() && e('9'); // 测试获取区域113,114,115的泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[4], $type[0])) && p() && e('3'); // 测试获取区域113,114,115的bug泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[4], $type[1])) && p() && e('3'); // 测试获取区域113,114,115的task泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[4], $type[2])) && p() && e('3'); // 测试获取区域113,114,115的story泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[5])) && p() && e('0'); // 测试获取不存在的区域的泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[5], $type[0])) && p() && e('0'); // 测试获取不存在的区域的bug泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[5], $type[1])) && p() && e('0'); // 测试获取不存在的区域的task泳道
|
||||
r($kanban->getLaneGroupByRegionsTest($regionsList[5], $type[2])) && p() && e('0'); // 测试获取不存在的区域的story泳道
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getLanePairsByGroup();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$groupIDList = array('101', '102', '103', '104', '105', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getLanePairsByGroupTest($groupIDList[0])) && p() && e('研发需求'); // 获取泳道组101的泳道
|
||||
r($kanban->getLanePairsByGroupTest($groupIDList[1])) && p() && e('Bug'); // 获取泳道组102的泳道
|
||||
r($kanban->getLanePairsByGroupTest($groupIDList[2])) && p() && e('任务'); // 获取泳道组103的泳道
|
||||
r($kanban->getLanePairsByGroupTest($groupIDList[3])) && p() && e('研发需求'); // 获取泳道组104的泳道
|
||||
r($kanban->getLanePairsByGroupTest($groupIDList[4])) && p() && e('Bug'); // 获取泳道组105的泳道
|
||||
r($kanban->getLanePairsByGroupTest($groupIDList[5])) && p() && e('0'); // 获取不存在泳道组的泳道
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getLanePairsByRegion();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$regionIDList = array('101', '102', '103', '104', '105', '1000001');
|
||||
$type = array('bug', 'task', 'story');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[0])) && p() && e('研发需求,Bug,任务'); // 测试获取区域101的泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[0], $type[0])) && p() && e('Bug'); // 测试获取区域101的bug泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[0], $type[1])) && p() && e('任务'); // 测试获取区域101的task泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[0], $type[2])) && p() && e('研发需求'); // 测试获取区域101的story泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[1])) && p() && e('研发需求,Bug,任务'); // 测试获取区域102的泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[1], $type[0])) && p() && e('Bug'); // 测试获取区域102的bug泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[1], $type[1])) && p() && e('任务'); // 测试获取区域102的task泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[1], $type[2])) && p() && e('研发需求'); // 测试获取区域102的story泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[2])) && p() && e('研发需求,Bug,任务'); // 测试获取区域103的泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[2], $type[0])) && p() && e('Bug'); // 测试获取区域103的bug泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[2], $type[1])) && p() && e('任务'); // 测试获取区域103的task泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[2], $type[2])) && p() && e('研发需求'); // 测试获取区域103的story泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[3])) && p() && e('研发需求,Bug,任务'); // 测试获取区域104的泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[3], $type[0])) && p() && e('Bug'); // 测试获取区域104的bug泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[3], $type[1])) && p() && e('任务'); // 测试获取区域104的task泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[3], $type[2])) && p() && e('研发需求'); // 测试获取区域104的story泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[4])) && p() && e('研发需求,Bug,任务'); // 测试获取区域105的泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[4], $type[0])) && p() && e('Bug'); // 测试获取区域105的bug泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[4], $type[1])) && p() && e('任务'); // 测试获取区域105的task泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[4], $type[2])) && p() && e('研发需求'); // 测试获取区域105的story泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[5])) && p() && e('0'); // 测试获取不存在的区域的泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[5], $type[0])) && p() && e('0'); // 测试获取不存在的区域的bug泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[5], $type[1])) && p() && e('0'); // 测试获取不存在的区域的task泳道
|
||||
r($kanban->getLanePairsByRegionTest($regionIDList[5], $type[2])) && p() && e('0'); // 测试获取不存在的区域的story泳道
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getLanes4Group();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$executionIDList = array('101', '102', '103', '104', '105');
|
||||
$browseTypeList = array('story', 'task', 'bug');
|
||||
$groupByList = array('pri', 'category', 'module', 'source', 'assignedTo', 'story', 'severity');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getLanes4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[0])) && p() && e(',优先级: 无,2,4'); // 获取执行101 story pri的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[1])) && p() && e(',类型: 无,功能'); // 获取执行101 story category的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[2])) && p() && e(',所属模块: 无,产品模块2,产品模块4'); // 获取执行101 story module的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[3])) && p() && e(',来源: 无,用户,市场'); // 获取执行101 story source的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[0])) && p() && e(',优先级: 无,1,2,4'); // 获取执行102 task pri的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[2])) && p() && e(',所属模块: 无,模块4,模块10,模块13,模块16'); // 获取执行102 task module的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[4])) && p() && e(',指派给: 无'); // 获取执行102 task assignedTo的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[5])) && p() && e(',相关研发需求: 无,用户需求5'); // 获取执行102 task story的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[0])) && p() && e(',优先级: 无,1,3,4'); // 获取执行101 bug pri的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[2])) && p() && e(',所属模块: 无,产品模块11,产品模块12,产品模块13'); // 获取执行101 bug module的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[4])) && p() && e(',指派给: 无,admin,测试1'); // 获取执行101 bug assignedTo的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[6])) && p() && e(',严重程度: 无,1,3,4'); // 获取执行101 bug severity的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[0])) && p() && e(',优先级: 无,2,4'); // 获取执行101 story pri的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[1])) && p() && e(',类型: 无,功能'); // 获取执行101 story category的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[2])) && p() && e(',所属模块: 无,产品模块14,产品模块16'); // 获取执行101 story module的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[3])) && p() && e(',来源: 无,用户,其他'); // 获取执行101 story source的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[0])) && p() && e(',优先级: 无,1,2,3'); // 获取执行102 task pri的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[2])) && p() && e(',所属模块: 无,模块13,模块37,模块40,模块43'); // 获取执行102 task module的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[4])) && p() && e(',指派给: 无'); // 获取执行102 task assignedTo的泳道
|
||||
r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[5])) && p() && e(',相关研发需求: 无,用户需求17'); // 获取执行102 task story的泳道
|
||||
system("./ztest init");
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getObjectGroup();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$executionIDList = array('101', '102', '103', '104', '105');
|
||||
$browseTypeList = array('story', 'task', 'bug');
|
||||
$groupByList = array('pri', 'category', 'module', 'source', 'assignedTo', 'story', 'severity');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getObjectGroupTest($executionIDList[0], $browseTypeList[0], $groupByList[0])) && p() && e('4,2'); // 获取执行101 story pri的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[0], $browseTypeList[0], $groupByList[1])) && p() && e('feature'); // 获取执行101 story category的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[0], $browseTypeList[0], $groupByList[2])) && p() && e('1824,1822'); // 获取执行101 story module的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[0], $browseTypeList[0], $groupByList[3])) && p() && e('user,market'); // 获取执行101 story source的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[1], $browseTypeList[1], $groupByList[0])) && p() && e('4,2,1'); // 获取执行102 task pri的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[1], $browseTypeList[1], $groupByList[2])) && p() && e('36,33,30,24'); // 获取执行102 task module的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[1], $browseTypeList[1], $groupByList[4])) && p() && e('0'); // 获取执行102 task assignedTo的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[1], $browseTypeList[1], $groupByList[5])) && p() && e('8,6,0'); // 获取执行102 task story的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[2], $browseTypeList[2], $groupByList[0])) && p() && e('4,3,1'); // 获取执行101 bug pri的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[2], $browseTypeList[2], $groupByList[2])) && p() && e('1833,1832,1831,0'); // 获取执行101 bug module的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[2], $browseTypeList[2], $groupByList[4])) && p() && e('test1,admin'); // 获取执行101 bug assignedTo的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[2], $browseTypeList[2], $groupByList[6])) && p() && e('4,3,1'); // 获取执行101 bug severity的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[3], $browseTypeList[0], $groupByList[0])) && p() && e('4,2'); // 获取执行101 story pri的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[3], $browseTypeList[0], $groupByList[1])) && p() && e('feature'); // 获取执行101 story category的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[3], $browseTypeList[0], $groupByList[2])) && p() && e('1836,1834'); // 获取执行101 story module的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[3], $browseTypeList[0], $groupByList[3])) && p() && e('user,other'); // 获取执行101 story source的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[4], $browseTypeList[1], $groupByList[0])) && p() && e('3,2,1'); // 获取执行102 task pri的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[4], $browseTypeList[1], $groupByList[2])) && p() && e('63,60,57,33'); // 获取执行102 task module的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[4], $browseTypeList[1], $groupByList[4])) && p() && e('0'); // 获取执行102 task assignedTo的分组
|
||||
r($kanban->getObjectGroupTest($executionIDList[4], $browseTypeList[1], $groupByList[5])) && p() && e('20,18,0'); // 获取执行102 task story的分组
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getPlanKanban();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$productIDList = array('1', '2', '3', '41', '42');
|
||||
$branchIDList = array('0', '1', '3');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getPlanKanbanTest($productIDList[0])) && p() && e('lanes:1, cards:3'); // 测试获取产品1的计划看板
|
||||
r($kanban->getPlanKanbanTest($productIDList[1])) && p() && e('lanes:1, cards:3'); // 测试获取产品2的计划看板
|
||||
r($kanban->getPlanKanbanTest($productIDList[2])) && p() && e('lanes:1, cards:3'); // 测试获取产品3的计划看板
|
||||
r($kanban->getPlanKanbanTest($productIDList[3])) && p() && e('lanes:3, cards:2'); // 测试获取产品4的计划看板
|
||||
r($kanban->getPlanKanbanTest($productIDList[3], $branchIDList[1])) && p() && e('lanes:1, cards:1'); // 测试获取产品4 分支1的计划看板
|
||||
r($kanban->getPlanKanbanTest($productIDList[4])) && p() && e('lanes:3, cards:2'); // 测试获取产品5的计划看板
|
||||
r($kanban->getPlanKanbanTest($productIDList[4], $branchIDList[2])) && p() && e('lanes:1, cards:1'); // 测试获取产品5 分支3的计划看板
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getRDColumnGroupByRegions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$regions = array('1', '2', '3,4', '5,6,7', '8,9,10,11');
|
||||
$groupIDList = array('1', '2', '3', '5,6', '8,10');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[0])) && p() && e('4'); // 测试获取region 1 执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[0], $groupIDList[0])) && p() && e('4'); // 测试获取region 1 group 1执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[0], $groupIDList[1])) && p() && e('0'); // 测试获取region 1 group 2执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[1])) && p() && e('4'); // 测试获取region 2 执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[1], $groupIDList[1])) && p() && e('4'); // 测试获取region 2 group 2执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[1], $groupIDList[0])) && p() && e('0'); // 测试获取region 2 group 1执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[2])) && p() && e('8'); // 测试获取region 3 执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[2], $groupIDList[2])) && p() && e('4'); // 测试获取region 3 group 3执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[2], $groupIDList[0])) && p() && e('0'); // 测试获取region 3 group 1执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[3])) && p() && e('12'); // 测试获取region 4 执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[3], $groupIDList[3])) && p() && e('8'); // 测试获取region 4 group 5,6执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[4])) && p() && e('16'); // 测试获取region 5 执行看板泳道列组
|
||||
r($kanban->getRDColumnGroupByRegionsTest($regions[4], $groupIDList[4])) && p() && e('8'); // 测试获取region 5 group 8,10执行看板泳道列组
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getRDKanban();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$executionIDList = array('161', '162', '163', '164', '165');
|
||||
$browseTypeList = array('all', 'story', 'task', 'bug');
|
||||
$regionIDList = array('0', '101', '102', '103', '104', '105');
|
||||
$groupBy = 'pri';
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getRDKanbanTest($executionIDList[0])) && p() && e('columns:27, lanes:3, cards:5'); // 获取执行161的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[0], $browseTypeList[0], $regionIDList[1])) && p() && e('columns:27, lanes:3, cards:8'); // 获取执行161 all region 101的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[0], $browseTypeList[0], $regionIDList[2])) && p() && e('columns:0, lanes:0, cards:0'); // 获取执行161 all region 102的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[1])) && p() && e('columns:27, lanes:3, cards:5'); // 获取执行162的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[1], $browseTypeList[1], $regionIDList[2])) && p() && e('columns:11, lanes:1, cards:2'); // 获取执行162 story region 102的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[2])) && p() && e('columns:27, lanes:3, cards:0'); // 获取执行163的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[2], $browseTypeList[2], $regionIDList[3])) && p() && e('columns:7, lanes:1, cards:4'); // 获取执行163 task region 103的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[3])) && p() && e('columns:27, lanes:3, cards:0'); // 获取执行164的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[3], $browseTypeList[3], $regionIDList[4])) && p() && e('columns:9, lanes:1, cards:3'); // 获取执行164 bug region 104的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[4])) && p() && e('columns:27, lanes:3, cards:0'); // 获取执行165的执行看板
|
||||
r($kanban->getRDKanbanTest($executionIDList[4], $browseTypeList[1], $regionIDList[5])) && p() && e('columns:11, lanes:1, cards:2'); // 获取执行165 story region 105的执行看板
|
||||
Reference in New Issue
Block a user