* kanban: modify unit test.
This commit is contained in:
@@ -2584,6 +2584,7 @@ class kanbanModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑看板泳道。
|
||||
* Update kanban lane.
|
||||
*
|
||||
* @param int $executionID
|
||||
@@ -2592,7 +2593,7 @@ class kanbanModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateLane($executionID, $laneType, $cardID = 0)
|
||||
public function updateLane(int $executionID, string $laneType, int $cardID = 0)
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
if($execution->type == 'kanban')
|
||||
|
||||
@@ -4,35 +4,39 @@ include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/kanban.class.php';
|
||||
su('admin');
|
||||
|
||||
zdTable('project')->config('kanbanexecution')->gen(5);
|
||||
zdTable('kanbanlane')->config('rdkanbanlane')->gen(5);
|
||||
zdTable('kanbancell')->config('rdkanbancell')->gen(5);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->updateLane();
|
||||
timeout=0
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试更新执行101的story泳道 >> 0
|
||||
测试更新执行101的bug泳道 >> ,1,3,301,2,
|
||||
测试更新执行101的task泳道 >> ,1,901,907,902,908,903,909,904,910,905,906,
|
||||
测试更新执行102的story泳道 >> ,6,8,
|
||||
测试更新执行102的bug泳道 >> ,5,302,4,6,
|
||||
测试更新执行102的task泳道 >> ,2,604,605,606,
|
||||
测试更新执行103的story泳道 >> ,10,12,
|
||||
测试更新执行103的bug泳道 >> ,7,9,303,8,
|
||||
测试更新执行103的task泳道 >> ,607,608,3,609,
|
||||
- 测试更新执行101的story泳道 @0
|
||||
- 测试更新执行101的bug泳道 @0
|
||||
- 测试更新执行101的task泳道 @,1,21,
|
||||
- 测试更新执行102的story泳道 @0
|
||||
- 测试更新执行102的bug泳道 @0
|
||||
- 测试更新执行102的task泳道 @,2,22,
|
||||
- 测试更新执行103的story泳道 @0
|
||||
- 测试更新执行103的bug泳道 @0
|
||||
- 测试更新执行103的task泳道 @,3,23,
|
||||
|
||||
*/
|
||||
|
||||
$executionID = array('101', '102', '103');
|
||||
$executionID = array('1', '2', '3');
|
||||
$laneType = array('story', 'bug', 'task');
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
r($kanban->updateLaneTest($executionID[0], $laneType[0])) && p() && e('0'); // 测试更新执行101的story泳道
|
||||
r($kanban->updateLaneTest($executionID[0], $laneType[1])) && p() && e(',1,3,301,2,'); // 测试更新执行101的bug泳道
|
||||
r($kanban->updateLaneTest($executionID[0], $laneType[2])) && p() && e(',1,901,907,902,908,903,909,904,910,905,906,'); // 测试更新执行101的task泳道
|
||||
r($kanban->updateLaneTest($executionID[1], $laneType[0])) && p() && e(',6,8,'); // 测试更新执行102的story泳道
|
||||
r($kanban->updateLaneTest($executionID[1], $laneType[1])) && p() && e(',5,302,4,6,'); // 测试更新执行102的bug泳道
|
||||
r($kanban->updateLaneTest($executionID[1], $laneType[2])) && p() && e(',2,604,605,606,'); // 测试更新执行102的task泳道
|
||||
r($kanban->updateLaneTest($executionID[2], $laneType[0])) && p() && e(',10,12,'); // 测试更新执行103的story泳道
|
||||
r($kanban->updateLaneTest($executionID[2], $laneType[1])) && p() && e(',7,9,303,8,'); // 测试更新执行103的bug泳道
|
||||
r($kanban->updateLaneTest($executionID[2], $laneType[2])) && p() && e(',607,608,3,609,'); // 测试更新执行103的task泳道
|
||||
r($kanban->updateLaneTest($executionID[0], $laneType[0])) && p('', '|') && e('0'); // 测试更新执行101的story泳道
|
||||
r($kanban->updateLaneTest($executionID[0], $laneType[1])) && p('', '|') && e('0'); // 测试更新执行101的bug泳道
|
||||
r($kanban->updateLaneTest($executionID[0], $laneType[2])) && p('', '|') && e(',1,21,'); // 测试更新执行101的task泳道
|
||||
r($kanban->updateLaneTest($executionID[1], $laneType[0])) && p('', '|') && e('0'); // 测试更新执行102的story泳道
|
||||
r($kanban->updateLaneTest($executionID[1], $laneType[1])) && p('', '|') && e('0'); // 测试更新执行102的bug泳道
|
||||
r($kanban->updateLaneTest($executionID[1], $laneType[2])) && p('', '|') && e(',2,22,'); // 测试更新执行102的task泳道
|
||||
r($kanban->updateLaneTest($executionID[2], $laneType[0])) && p('', '|') && e('0'); // 测试更新执行103的story泳道
|
||||
r($kanban->updateLaneTest($executionID[2], $laneType[1])) && p('', '|') && e('0'); // 测试更新执行103的bug泳道
|
||||
r($kanban->updateLaneTest($executionID[2], $laneType[2])) && p('', '|') && e(',3,23,'); // 测试更新执行103的task泳道
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
|
||||
title=测试 kanbanModel->updateRegion();
|
||||
timeout=0
|
||||
cid=1
|
||||
@@ -9,6 +11,7 @@ cid=1
|
||||
- 更新看板区域名称为空第name条的0属性 @『区域名称』不能为空。
|
||||
- 更新看板区域名称为空格字符第name条的0属性 @『区域名称』不能为空。
|
||||
- 更新看板区域名称为超长字符串第name条的0属性 @『区域名称』长度应当不超过『255』,且大于『0』。
|
||||
|
||||
*/
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
@@ -25,4 +28,4 @@ $kanban = new kanbanTest();
|
||||
r($kanban->updateRegionTest($regionIDList[0], $nameList[0])) && p('name') && e('测试修改区域名称'); // 正常更新看板区域的名称
|
||||
r($kanban->updateRegionTest($regionIDList[1], $nameList[1])) && p('name:0') && e('『区域名称』不能为空。'); // 更新看板区域名称为空
|
||||
r($kanban->updateRegionTest($regionIDList[2], $nameList[2])) && p('name:0') && e('『区域名称』不能为空。'); // 更新看板区域名称为空格字符
|
||||
r($kanban->updateRegionTest($regionIDList[3], $nameList[3])) && p('name:0') && e('『区域名称』长度应当不超过『255』,且大于『0』。'); // 更新看板区域名称为超长字符串
|
||||
r($kanban->updateRegionTest($regionIDList[3], $nameList[3])) && p('name:0') && e('『区域名称』长度应当不超过『255』,且大于『0』。'); // 更新看板区域名称为超长字符串
|
||||
Reference in New Issue
Block a user