Merge branch 'sprint/autoTest_liumengyi_kanban' into 'master'
* Add auto test of kanban. See merge request easycorp/zentaopms!2651
This commit is contained in:
+215
-31
@@ -233,13 +233,20 @@ class kanbanTest
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get kanban by id.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByIDTest($kanbanID)
|
||||
{
|
||||
$objects = $this->objectModel->getByID($kanbanID);
|
||||
$object = $this->objectModel->getByID($kanbanID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return $object;
|
||||
}
|
||||
|
||||
public function getKanbanDataTest($kanbanID)
|
||||
@@ -296,13 +303,23 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get kanban group by regions.
|
||||
*
|
||||
* @param string $regions
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getGroupGroupByRegionsTest($regions)
|
||||
{
|
||||
$objects = $this->objectModel->getGroupGroupByRegions($regions);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$count = 0;
|
||||
foreach($objects as $object) $count += count($object);
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function getLaneGroupByRegionsTest($regions, $browseType = 'all')
|
||||
@@ -329,16 +346,25 @@ class kanbanTest
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$count = 0;
|
||||
foreach($objects as $object) $count += count($object);
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get card group by kanban id.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getCardGroupByKanbanTest($kanbanID)
|
||||
{
|
||||
$objects = $this->objectModel->getCardGroupByKanban($kanbanID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
public function getImportedCardsTest($kanbanID, $cards, $fromType)
|
||||
@@ -359,31 +385,90 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get card group by execution id.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getCardGroupByExecutionTest($executionID, $browseType = 'all', $orderBy = 'id_asc')
|
||||
{
|
||||
$objects = $this->objectModel->getCardGroupByExecution($executionID, $browseType = 'all', $orderBy = 'id_asc');
|
||||
$objects = $this->objectModel->getCardGroupByExecution($executionID, $browseType, $orderBy);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get Kanban by execution id.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $groupBy
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getExecutionKanbanTest($executionID, $browseType = 'all', $groupBy = 'default')
|
||||
{
|
||||
$objects = $this->objectModel->getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default');
|
||||
$objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
|
||||
|
||||
if(empty($objects))
|
||||
{
|
||||
$this->objectModel->createExecutionLane($executionID, $browseType, $groupBy);
|
||||
$objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
|
||||
}
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$columnCount = 0;
|
||||
$laneCount = 0;
|
||||
$cardCount = 0;
|
||||
foreach($objects as $types)
|
||||
{
|
||||
foreach($types['lanes'] as $lane)
|
||||
{
|
||||
foreach($lane['cards'] as $card)
|
||||
{
|
||||
$cardCount += count($card);
|
||||
}
|
||||
}
|
||||
$columnCount += count($types['columns']);
|
||||
$laneCount += count($types['lanes']);
|
||||
}
|
||||
return 'columns:' . $columnCount . ', lanes:' . $laneCount . ', cards:' . $cardCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get kanban for group view.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $groupBy
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getKanban4GroupTest($executionID, $browseType, $groupBy)
|
||||
{
|
||||
$objects = $this->objectModel->getKanban4Group($executionID, $browseType, $groupBy);
|
||||
|
||||
if(empty($objects))
|
||||
{
|
||||
$this->objectModel->createExecutionLane($executionID, $browseType, $groupBy);
|
||||
$objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
|
||||
}
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$laneCount = 0;
|
||||
foreach($objects as $types)
|
||||
{
|
||||
$laneCount += count($types['lanes']);
|
||||
}
|
||||
return 'lanes:' . $laneCount;
|
||||
}
|
||||
|
||||
public function getLanes4GroupTest($executionID, $browseType, $groupBy, $cardList)
|
||||
@@ -422,13 +507,23 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getCanViewObjectsTest($objectType = 'kanban', $param = '')
|
||||
/**
|
||||
* Test get can view objects.
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $objectType
|
||||
* @param string $param
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCanViewObjectsTest($user, $objectType = 'kanban', $param = '')
|
||||
{
|
||||
$objects = $this->objectModel->getCanViewObjects($objectType = 'kanban', $param = '');
|
||||
su($user);
|
||||
$objects = $this->objectModel->getCanViewObjects($objectType, $param);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -925,49 +1020,100 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get kanban group by space id list.
|
||||
*
|
||||
* @param string $spaceIdList
|
||||
* @param string $kanbanIdList
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getGroupBySpaceListTest($spaceIdList, $kanbanIdList = '')
|
||||
{
|
||||
$objects = $this->objectModel->getGroupBySpaceList($spaceIdList, $kanbanIdList = '');
|
||||
$objects = $this->objectModel->getGroupBySpaceList($spaceIdList, $kanbanIdList);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$count = 0;
|
||||
if(empty($kanbanIdList))
|
||||
{
|
||||
foreach($objects as $object) $count += count($object);
|
||||
}
|
||||
else
|
||||
{
|
||||
$count += count($objects);
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get group list by region id.
|
||||
*
|
||||
* @param int $region
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getGroupListTest($region)
|
||||
{
|
||||
$objects = $this->objectModel->getGroupList($region);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$kanban = '';
|
||||
foreach($objects as $object) $kanban .= ',' . $object->kanban;
|
||||
return $kanban;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get column by id.
|
||||
*
|
||||
* @param int $columnID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getColumnByIDTest($columnID)
|
||||
{
|
||||
$objects = $this->objectModel->getColumnByID($columnID);
|
||||
$object = $this->objectModel->getColumnByID($columnID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get columns by object id.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @param int $archived
|
||||
* @param string $deleted
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getColumnsByObjectTest($objectType = '', $objectID = 0, $archived = 0, $deleted = '0')
|
||||
{
|
||||
$objects = $this->objectModel->getColumnsByObject($objectType = '', $objectID = 0, $archived = 0, $deleted = '0');
|
||||
$objects = $this->objectModel->getColumnsByObject($objectType, $objectID, $archived, $deleted);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get column ID by lane ID.
|
||||
*
|
||||
* @param int $laneID
|
||||
* @param string $columnType
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getColumnIDByLaneIDTest($laneID, $columnType)
|
||||
{
|
||||
$objects = $this->objectModel->getColumnIDByLaneID($laneID, $columnType);
|
||||
$object = $this->objectModel->getColumnIDByLaneID($laneID, $columnType);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return $object;
|
||||
}
|
||||
|
||||
public function getLaneByIdTest($laneID)
|
||||
@@ -988,40 +1134,78 @@ class kanbanTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get card by id.
|
||||
*
|
||||
* @param int $cardID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getCardByIDTest($cardID)
|
||||
{
|
||||
$objects = $this->objectModel->getCardByID($cardID);
|
||||
$object = $this->objectModel->getCardByID($cardID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get cards by object id.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @param string $archived
|
||||
* @param string $deleted
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getCardsByObjectTest($objectType = '', $objectID = 0, $archived = '0', $deleted = '0')
|
||||
{
|
||||
$objects = $this->objectModel->getCardsByObject($objectType = '', $objectID = 0, $archived = '0', $deleted = '0');
|
||||
$objects = $this->objectModel->getCardsByObject($objectType, $objectID, $archived, $deleted);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get cards to import.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @param int $excludedID
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getCards2ImportTest($kanbanID = 0, $excludedID = 0, $pager = null)
|
||||
{
|
||||
$objects = $this->objectModel->getCards2Import($kanbanID = 0, $excludedID = 0, $pager = null);
|
||||
$objects = $this->objectModel->getCards2Import($kanbanID, $excludedID, $pager);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
public function getKanbanCardMenuTest($executionID, $objects, $objecType)
|
||||
public function getKanbanCardMenuTest($executionID, $objecType)
|
||||
{
|
||||
$objects = $this->objectModel->getKanbanCardMenu($executionID, $objects, $objecType);
|
||||
global $tester;
|
||||
/* Get group objects. */
|
||||
if($objecType == 'story') $objectGroup['story'] = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory');
|
||||
if($objecType == 'bug') $objectGroup['bug'] = $tester->loadModel('bug')->getExecutionBugs($executionID);
|
||||
if($objecType == 'task') $objectGroup['task'] = $tester->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
|
||||
$objects = array();
|
||||
/* Get objects cards menus. */
|
||||
if($objecType == 'story') $objects = $this->objectModel->getKanbanCardMenu($executionID, $objectGroup['story'], 'story');
|
||||
if($objecType == 'bug') $objects = $this->objectModel->getKanbanCardMenu($executionID, $objectGroup['bug'], 'bug');
|
||||
if($objecType == 'task') $objects = $this->objectModel->getKanbanCardMenu($executionID, $objectGroup['task'], 'task');
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$count = 0;
|
||||
foreach($objects as $object) $count += count($object);
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function isClickableTest($object, $action)
|
||||
|
||||
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->getByID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getByIDTest($kanbanIDList[0])) && p('name,space,owner,team,whitelist') && e('通用看板1,1,po15,,user3,po15,,,user3,po15'); // 测试查询看板1的信息
|
||||
r($kanban->getByIDTest($kanbanIDList[1])) && p('name,space,owner,team,whitelist') && e('通用看板2,1,po15,,user3,po15,,,user3,po15'); // 测试查询看板2的信息
|
||||
r($kanban->getByIDTest($kanbanIDList[2])) && p('name,space,owner,team,whitelist') && e('通用看板3,2,po16,,user4,po16,,,user4,po16'); // 测试查询看板3的信息
|
||||
r($kanban->getByIDTest($kanbanIDList[3])) && p('name,space,owner,team,whitelist') && e('通用看板4,2,po16,,user4,po16,,,user4,po16'); // 测试查询看板4的信息
|
||||
r($kanban->getByIDTest($kanbanIDList[4])) && p('name,space,owner,team,whitelist') && e('通用看板5,3,po17,,user5,po17,,,user5,po17'); // 测试查询看板5的信息
|
||||
r($kanban->getByIDTest($kanbanIDList[5])) && p('name,space,owner,team,whitelist') && e('0'); // 测试查询不存在的看板信息
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/kanban.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->getCanViewObjects();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
$userList = array('admin', 'po1', 'po2', 'user1', 'user2', 'pm1', 'pm2');
|
||||
$objectType = array('kanban', 'kanbanspace');
|
||||
$paramList = array('noclosed', 'private', 'cooperation', 'public', 'involved');
|
||||
|
||||
r($kanban->getCanViewObjectsTest($userList[0])) && p() && e('32'); // 测试查询admin有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0], $objectType[1])) && p() && e('19'); // 测试查询admin有权限查看的空间个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[0])) && p() && e('100'); // 测试查询admin有权限查看的未关闭看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[1])) && p() && e('32'); // 测试查询admin有权限查看的私人看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[2])) && p() && e('100'); // 测试查询admin有权限查看的协同看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[3])) && p() && e('100'); // 测试查询admin有权限查看的公共看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[4])) && p() && e('0'); // 测试查询admin有权限查看的参与看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0])) && p() && e('32'); // 测试查询admin有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[0])) && p() && e('32'); // 测试查询admin有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[1])) && p() && e('32'); // 测试查询po1有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[2])) && p() && e('32'); // 测试查询po2有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[3])) && p() && e('32'); // 测试查询user1有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[4])) && p() && e('32'); // 测试查询user2有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[5])) && p() && e('32'); // 测试查询pm1有权限查看的看板个数
|
||||
r($kanban->getCanViewObjectsTest($userList[6])) && p() && e('32'); // 测试查询pm2有权限查看的看板个数
|
||||
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->getCardByID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$cardIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getCardByIDTest($cardIDList[0])) && p('name,status,pri,progress') && e('卡片1,doing,3,0'); // 测试查询卡片1的信息
|
||||
r($kanban->getCardByIDTest($cardIDList[1])) && p('name,status,pri,progress') && e('卡片2,doing,3,50'); // 测试查询卡片2的信息
|
||||
r($kanban->getCardByIDTest($cardIDList[2])) && p('name,status,pri,progress') && e('卡片3,done,3,100'); // 测试查询卡片3的信息
|
||||
r($kanban->getCardByIDTest($cardIDList[3])) && p('name,status,pri,progress') && e('卡片4,doing,3,0'); // 测试查询卡片4的信息
|
||||
r($kanban->getCardByIDTest($cardIDList[4])) && p('name,status,pri,progress') && e('卡片5,doing,3,50'); // 测试查询卡片5的信息
|
||||
r($kanban->getCardByIDTest($cardIDList[5])) && p() && e('0'); // 测试查询不存在卡片的信息
|
||||
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->getCardGroupByKanban();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getCardGroupByKanbanTest($kanbanIDList[0])) && p() && e('1'); // 测试查询看板1的卡片数量
|
||||
r($kanban->getCardGroupByKanbanTest($kanbanIDList[1])) && p() && e('1'); // 测试查询看板2的卡片数量
|
||||
r($kanban->getCardGroupByKanbanTest($kanbanIDList[2])) && p() && e('1'); // 测试查询看板3的卡片数量
|
||||
r($kanban->getCardGroupByKanbanTest($kanbanIDList[3])) && p() && e('1'); // 测试查询看板4的卡片数量
|
||||
r($kanban->getCardGroupByKanbanTest($kanbanIDList[4])) && p() && e('1'); // 测试查询看板5的卡片数量
|
||||
r($kanban->getCardGroupByKanbanTest($kanbanIDList[5])) && p() && e('0'); // 测试查询不存在看板的卡片数量
|
||||
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->getCards2Import();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
$excludedID = 1;
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getCards2ImportTest()) && p() && e('256'); // 测试获取可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[0])) && p() && e('0'); // 测试获取看板1可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[0], $excludedID)) && p() && e('0'); // 测试获取看板1可以导入的卡片数量 排除看板1
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[1])) && p() && e('0'); // 测试获取看板2可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[1], $excludedID)) && p() && e('0'); // 测试获取看板2可以导入的卡片数量 排除看板1
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[2])) && p() && e('0'); // 测试获取看板3可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[2], $excludedID)) && p() && e('0'); // 测试获取看板3可以导入的卡片数量 排除看板1
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[3])) && p() && e('0'); // 测试获取看板4可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[3], $excludedID)) && p() && e('0'); // 测试获取看板4可以导入的卡片数量 排除看板1
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[4])) && p() && e('8'); // 测试获取看板5可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[4])) && p() && e('8'); // 测试获取看板5可以导入的卡片数量
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[5], $excludedID)) && p() && e('0'); // 测试获取不存在看板可以导入的卡片数量 排除看板1
|
||||
r($kanban->getCards2ImportTest($kanbanIDList[5], $excludedID)) && p() && e('0'); // 测试获取不存在看板可以导入的卡片数量 排除看板1
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/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->getCardsByObject();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$objectType = array('kanban', 'region', 'status');
|
||||
$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
$regionIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
$statusList = array('doing', 'done');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[0])) && p() && e('8'); // 测试查询kanban 1的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[1])) && p() && e('8'); // 测试查询kanban 2的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[2])) && p() && e('8'); // 测试查询kanban 3的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[3])) && p() && e('8'); // 测试查询kanban 4的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[4])) && p() && e('8'); // 测试查询kanban 5的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[5])) && p() && e('0'); // 测试查询不存在kanban的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[0])) && p() && e('8'); // 测试查询region 1的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[1])) && p() && e('8'); // 测试查询region 2的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[2])) && p() && e('8'); // 测试查询region 3的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[3])) && p() && e('8'); // 测试查询region 4的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[4])) && p() && e('8'); // 测试查询region 5的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[5])) && p() && e('0'); // 测试查询不存在region的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[2], $statusList[0])) && p() && e('534'); // 测试查询status doing的卡片数量
|
||||
r($kanban->getCardsByObjectTest($objectType[2], $statusList[1])) && p() && e('266'); // 测试查询status doing的卡片数量
|
||||
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->getColumnByID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$columnIDList = array('1', '2', '3', '4', '5', '1000001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getColumnByIDTest($columnIDList[0])) && p('type,region,name,limit') && e('column1,1,未开始,-1'); // 测试查询看板列1的信息
|
||||
r($kanban->getColumnByIDTest($columnIDList[1])) && p('type,region,name,limit') && e('column2,1,进行中,-1'); // 测试查询看板列2的信息
|
||||
r($kanban->getColumnByIDTest($columnIDList[2])) && p('type,region,name,limit') && e('column3,1,已完成,-1'); // 测试查询看板列3的信息
|
||||
r($kanban->getColumnByIDTest($columnIDList[3])) && p('type,region,name,limit') && e('column4,1,已关闭,-1'); // 测试查询看板列4的信息
|
||||
r($kanban->getColumnByIDTest($columnIDList[4])) && p('type,region,name,limit') && e('column5,2,未开始,-1'); // 测试查询看板列5的信息
|
||||
r($kanban->getColumnByIDTest($columnIDList[5])) && p('type,region,name,limit') && e('0'); // 测试查询不存在看板列的信息
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
#!/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->getColumnGroupByRegions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$regions1 = '1,2,3';
|
||||
$regions2 = '4,5,6';
|
||||
$regions3 = '7,8,9';
|
||||
$regions4 = '10,11,12';
|
||||
$regions5 = '13,14,15';
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getColumnGroupByRegionsTest($regions1)) && p() && e('12'); // 测试获取region 1 2 3 的看板列数量
|
||||
r($kanban->getColumnGroupByRegionsTest($regions2)) && p() && e('12'); // 测试获取region 4,5,6的看板列数量
|
||||
r($kanban->getColumnGroupByRegionsTest($regions3)) && p() && e('12'); // 测试获取region 7,8,9的看板列数量
|
||||
r($kanban->getColumnGroupByRegionsTest($regions4)) && p() && e('12'); // 测试获取region 10,11,12的看板列数量
|
||||
r($kanban->getColumnGroupByRegionsTest($regions5)) && p() && e('12'); // 测试获取region 13,14,15的看板列数量
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/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->getColumnIDByLaneID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$laneIDList = array('1', '2', '107', '108', '109', '10001');
|
||||
$columnTypeList = array('column1', 'column2', 'wait', 'test', 'backlog');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[0])) && p() && e('1'); // 测试获取泳道1 column1的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[1])) && p() && e('2'); // 测试获取泳道1 column2的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道1 wait的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[3])) && p() && e('0'); // 测试获取泳道1 test的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[4])) && p() && e('0'); // 测试获取泳道1 backlog的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[1], $columnTypeList[1])) && p() && e('0'); // 测试获取泳道2 column2的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[1], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道2 wait的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[2], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道107 wait的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[2], $columnTypeList[3])) && p() && e('460'); // 测试获取泳道107 test的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[2], $columnTypeList[4])) && p() && e('455'); // 测试获取泳道107 backlog的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[3], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道108 wait的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[3], $columnTypeList[3])) && p() && e('471'); // 测试获取泳道108 test的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[3], $columnTypeList[4])) && p() && e('0'); // 测试获取泳道108 backlog的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[4], $columnTypeList[2])) && p() && e('475'); // 测试获取泳道109 wait的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[4], $columnTypeList[3])) && p() && e('0'); // 测试获取泳道109 test的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[4], $columnTypeList[4])) && p() && e('0'); // 测试获取泳道109 backlog的看板列
|
||||
r($kanban->getColumnIDByLaneIDTest($laneIDList[5], $columnTypeList[0])) && p() && e('0'); // 测试获取不存在的泳道 common的看板列
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/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->getColumnsByObject();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$objectTypeList = array('parent', 'region', '`group`');
|
||||
$parentIDList = array('457', '468', '471', '100001');
|
||||
$regionIDList = array('1', '2', '3', '100001');
|
||||
$groupIDList = array('1', '2', '3', '100001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[0])) && p() && e('2'); // 测试获取parent 457的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[1])) && p() && e('2'); // 测试获取parent 468的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[2])) && p() && e('2'); // 测试获取parent 471的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[3])) && p() && e('0'); // 测试获取parent 100001的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[0])) && p() && e('0'); // 测试获取region 1的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[1])) && p() && e('0'); // 测试获取region 2的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[2])) && p() && e('0'); // 测试获取region 3的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[3])) && p() && e('0'); // 测试获取region 100001的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[0])) && p() && e('7'); // 测试获取group 1的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[1])) && p() && e('9'); // 测试获取group 2的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[2])) && p() && e('9'); // 测试获取group 3的看板列数量
|
||||
r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[3])) && p() && e('0'); // 测试获取group 100001的看板列数量
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/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->getExecutionKanban();
|
||||
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->getExecutionKanbanTest($executionIDList[0])) && p() && e('columns:27, lanes:3, cards:15'); // 测试获取execution101的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[0], $browseTypeList[0])) && p() && e('columns:11, lanes:1, cards:0'); // 测试获取execution101 story的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[0], $browseTypeList[1])) && p() && e('columns:7, lanes:1, cards:11'); // 测试获取execution101 task的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[0], $browseTypeList[2])) && p() && e('columns:9, lanes:1, cards:4'); // 测试获取execution101 bug的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[1])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution102的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[1], $browseTypeList[0], $groupByList[0])) && p() && e('columns:11, lanes:3, cards:2'); // 测试获取execution102 story pri的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[1], $browseTypeList[0], $groupByList[1])) && p() && e('columns:11, lanes:2, cards:2'); // 测试获取execution102 story category的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[2])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[2], $browseTypeList[1], $groupByList[2])) && p() && e('columns:7, lanes:5, cards:4'); // 测试获取execution103 task module的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[2], $browseTypeList[0], $groupByList[3])) && p() && e('columns:11, lanes:3, cards:2'); // 测试获取execution103 story source的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[3])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[3], $browseTypeList[2], $groupByList[4])) && p() && e('columns:9, lanes:2, cards:4'); // 测试获取execution103 bug module的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[3], $browseTypeList[2], $groupByList[5])) && p() && e('columns:9, lanes:5, cards:4'); // 测试获取execution103 bug source的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[4])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[4], $browseTypeList[2], $groupByList[5])) && p() && e('columns:9, lanes:5, cards:4'); // 测试获取execution103 bug module的执行看板信息
|
||||
r($kanban->getExecutionKanbanTest($executionIDList[4], $browseTypeList[2], $groupByList[6])) && p() && e('columns:9, lanes:4, cards:4'); // 测试获取execution103 bug severity的执行看板信息
|
||||
system("./ztest init");
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/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->getGroupBySpaceList();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$spaceIDList = array('1,2,3', '4,5,6', '7,8,9', '10,11,12', '13,14,15');
|
||||
$kanbanIDList = array('1,2,3,4', '7,8,11,12', '15,16,17,18', '19,20,21,22,23,24,25', '26,28,30');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[0])) && p() && e('6'); // 获取空间1 2 3的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[0], $kanbanIDList[0])) && p() && e('2'); // 获取空间1 2 3 看板1,2,3,4的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[1])) && p() && e('6'); // 获取空间4,5,6的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[1], $kanbanIDList[1])) && p() && e('2'); // 获取空间4,5,6 看板7,8,11,12的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[2])) && p() && e('6'); // 获取空间7,8,9的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[2], $kanbanIDList[2])) && p() && e('2'); // 获取空间7,8,9 看板15,16,17,18的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[3])) && p() && e('6'); // 获取空间10,11,12的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[3], $kanbanIDList[3])) && p() && e('3'); // 获取空间10,11,12 看板19,20,21,22,23,24,25的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[4])) && p() && e('6'); // 获取空间13,14,15的看板
|
||||
r($kanban->getGroupBySpaceListTest($spaceIDList[4], $kanbanIDList[4])) && p() && e('3'); // 获取空间13,14,15 看板26,28,30的看板
|
||||
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->getGroupGroupByRegions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$regions = array('1,2,3', '4,5,6', '7,8,9', '10,11,12', '13,14,15');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getGroupGroupByRegionsTest($regions[0])) && p() && e('3'); //获取区域1 2 3的泳道组数量
|
||||
r($kanban->getGroupGroupByRegionsTest($regions[1])) && p() && e('3'); //获取区域4,5,6的泳道组数量
|
||||
r($kanban->getGroupGroupByRegionsTest($regions[2])) && p() && e('3'); //获取区域7,8,9的泳道组数量
|
||||
r($kanban->getGroupGroupByRegionsTest($regions[3])) && p() && e('3'); //获取区域10,11,12的泳道组数量
|
||||
r($kanban->getGroupGroupByRegionsTest($regions[4])) && p() && e('3'); //获取区域13,14,15的泳道组数量
|
||||
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->getGroupList();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$regionIDList = array('1', '2', '107', '108', '109', '10001');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getGroupListTest($regionIDList[0])) && p() && e(',1'); // 获取区域1的看板
|
||||
r($kanban->getGroupListTest($regionIDList[1])) && p() && e(',2'); // 获取区域1的看板
|
||||
r($kanban->getGroupListTest($regionIDList[2])) && p() && e(',179,180,181'); // 获取区域1的看板
|
||||
r($kanban->getGroupListTest($regionIDList[3])) && p() && e(',182,183,184'); // 获取区域1的看板
|
||||
r($kanban->getGroupListTest($regionIDList[4])) && p() && e(',185,186,187'); // 获取区域1的看板
|
||||
r($kanban->getGroupListTest($regionIDList[5])) && p() && e('0'); // 获取区域1的看板
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/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->getKanban4Group();
|
||||
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->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行101 类型story 分组pri的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[1])) && p() && e('lanes:2'); //获取执行101 类型story 分组category的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[2])) && p() && e('lanes:3'); //获取执行101 类型story 分组module的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[3])) && p() && e('lanes:3'); //获取执行101 类型story 分组source的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[0])) && p() && e('lanes:4'); //获取执行102 类型task 分组pri的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[2])) && p() && e('lanes:5'); //获取执行102 类型task 分组module的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[4])) && p() && e('lanes:1'); //获取执行102 类型task 分组assignedTo的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[5])) && p() && e('lanes:2'); //获取执行102 类型task 分组story的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[0])) && p() && e('lanes:4'); //获取执行103 类型bug 分组pri的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[2])) && p() && e('lanes:4'); //获取执行103 类型bug 分组module的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[4])) && p() && e('lanes:3'); //获取执行103 类型bug 分组assignedTo的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[6])) && p() && e('lanes:4'); //获取执行103 类型bug 分组severity的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行104 类型story 分组pri的看板信息
|
||||
r($kanban->getKanban4GroupTest($executionIDList[4], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行105 类型story 分组pri的看板信息
|
||||
system("./ztest init");
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/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->getKanbanCardMenu();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '102', '103', '104', '105');
|
||||
$browseTypeList = array('story', 'task', 'bug');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[0], $browseTypeList[0])) && p() && e('12'); // 测试获取执行101 story的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[0], $browseTypeList[1])) && p() && e('60'); // 测试获取执行101 task的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[0], $browseTypeList[2])) && p() && e('23'); // 测试获取执行101 bug的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[1], $browseTypeList[0])) && p() && e('12'); // 测试获取执行102 story的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[1], $browseTypeList[1])) && p() && e('26'); // 测试获取执行102 task的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[1], $browseTypeList[2])) && p() && e('22'); // 测试获取执行102 bug的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[2], $browseTypeList[0])) && p() && e('12'); // 测试获取执行103 story的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[2], $browseTypeList[1])) && p() && e('25'); // 测试获取执行103 task的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[2], $browseTypeList[2])) && p() && e('23'); // 测试获取执行103 bug的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[3], $browseTypeList[0])) && p() && e('12'); // 测试获取执行104 story的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[3], $browseTypeList[1])) && p() && e('26'); // 测试获取执行104 task的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[3], $browseTypeList[2])) && p() && e('22'); // 测试获取执行104 bug的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[4], $browseTypeList[0])) && p() && e('12'); // 测试获取执行105 story的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[4], $browseTypeList[1])) && p() && e('25'); // 测试获取执行105 task的操作数量
|
||||
r($kanban->getKanbanCardMenuTest($executionIDList[4], $browseTypeList[2])) && p() && e('23'); // 测试获取执行105 bug的操作数量
|
||||
Reference in New Issue
Block a user