* [unittest] modify unittest.
This commit is contained in:
@@ -408,7 +408,7 @@ class todoTest
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getCycleListTest(bool $initCycle = true): int
|
||||
public function getCycleListTest(bool $initCycle = true): array
|
||||
{
|
||||
$todoList = $this->objectModel->getValidCycleList();
|
||||
|
||||
@@ -416,7 +416,7 @@ class todoTest
|
||||
|
||||
$cycleList = $this->objectModel->getCycleList($todoList);
|
||||
|
||||
return count($cycleList) > 0 ? 1 : 0;
|
||||
return $cycleList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,10 +15,22 @@ title=测试 todoTao::getCycleList();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 获取通过周期待办的生成的待办数据为空的情况,结果为 0 @0
|
||||
- 获取有周期待办生成的待办数量,结果为 3 @3
|
||||
- 获取有周期待办生成的待办数据详细信息
|
||||
- 第2条的account属性 @admin
|
||||
- 第2条的name属性 @周期待办:每月的每天,提前1天生成
|
||||
- 第2条的begin属性 @0801
|
||||
- 第2条的end属性 @1801
|
||||
|
||||
*/
|
||||
|
||||
initData();
|
||||
|
||||
$todo = new todoTest();
|
||||
r($todo->getCycleListTest($initCycleData = false)) && p() && e('0'); // 获取通过周期待办的生成的待办数据为空的情况,结果为 0
|
||||
r($todo->getCycleListTest($initCycleData = true)) && p() && e('1'); // 获取有周期待办生成的待办数据,结果为 1
|
||||
$cycleList = $todo->getCycleListTest($initCycleData = false);
|
||||
r(count($cycleList)) && p() && e('0'); // 获取通过周期待办的生成的待办数据为空的情况,结果为 0
|
||||
|
||||
$cycleList = $todo->getCycleListTest($initCycleData = true);
|
||||
r(count($cycleList)) && p() && e('3'); // 获取有周期待办生成的待办数量,结果为 3
|
||||
r($cycleList) && p('2:account,name,begin,end') && e('admin,周期待办:每月的每天,提前1天生成,0801,1801'); // 获取有周期待办生成的待办数据详细信息
|
||||
Reference in New Issue
Block a user