* Change the test case of the getdataoftasksperexecution.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<?php
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/task.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,18 +10,6 @@ title=taskModel->getDataOfTasksPerExecution();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 统计executionID为2的执行的任务数量
|
||||
- 第2条的name属性 @/迭代2
|
||||
- 第2条的value属性 @1
|
||||
|
||||
- 统计executionID为3的执行的任务数量
|
||||
- 第3条的name属性 @/迭代3
|
||||
- 第3条的value属性 @2
|
||||
|
||||
- 统计executionID为5的执行的任务数量
|
||||
- 第5条的name属性 @0
|
||||
- 第5条的value属性 @0
|
||||
|
||||
*/
|
||||
|
||||
$project = zdTable('project');
|
||||
@@ -38,7 +27,6 @@ $project->desc->range("[]");
|
||||
$project->budget->range("100000,200000");
|
||||
$project->budgetUnit->range("CNY");
|
||||
$project->percent->range("0-0");
|
||||
|
||||
$project->gen(4);
|
||||
|
||||
$task = zdTable('task');
|
||||
@@ -46,11 +34,11 @@ $task->id->range('2-5');
|
||||
$task->execution->range('2,3,3,4');
|
||||
$task->name->prefix("任务")->range('1-5');
|
||||
$task->status->range("wait");
|
||||
|
||||
$task->gen(4);
|
||||
|
||||
$tester->session->set('taskOnlyCondition', true);
|
||||
|
||||
$task = new taskTest();
|
||||
r($task->getDataOfTasksPerExecutionTest(2)) && p('2:name,value') && e('迭代2,1'); //统计executionID为2的执行的任务数量
|
||||
r($task->getDataOfTasksPerExecutionTest(3)) && p('3:name,value') && e('迭代3,2'); //统计executionID为3的执行的任务数量
|
||||
r($task->getDataOfTasksPerExecutionTest(5)) && p('5:name,value') && e('0,0'); //统计executionID为5的执行的任务数量
|
||||
r($task->getDataOfTasksPerExecutionTest(2)) && p('2:name,value') && e('迭代2,1'); // 统计executionID为2的执行的任务数量
|
||||
r($task->getDataOfTasksPerExecutionTest(3)) && p('3:name,value') && e('迭代3,2'); // 统计executionID为3的执行的任务数量
|
||||
r($task->getDataOfTasksPerExecutionTest(5)) && p('5:name,value') && e('0,0'); // 统计executionID为5的执行的任务数量
|
||||
|
||||
Reference in New Issue
Block a user