* Correct report's unit test.
This commit is contained in:
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/report.class.php';
|
||||
|
||||
zdTable('action')->gen('100');
|
||||
zdTable('action')->config('action_year')->gen('100');
|
||||
zdTable('case')->gen('20');
|
||||
zdTable('testrun')->gen('20');
|
||||
zdTable('testresult')->gen('10');
|
||||
@@ -23,9 +23,9 @@ $accounts = array(array('admin'), array('dev17'), array('test18'), array('admin'
|
||||
|
||||
$report = new reportTest();
|
||||
|
||||
r($report->getUserYearContributionsTest($accounts[0])) && p('', '|') && e('repo:svnCommit:1;doc:create:1;case:run:10;'); // 测试获取本年度 admin 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[1])) && p('', '|') && e('bug:close:1;product:close:1;repo:gitCommit:1;case:run:0;'); // 测试获取本年度 dev17 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[2])) && p('', '|') && e('productplan:create:1;case:run:0;'); // 测试获取本年度 test18 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[3])) && p('', '|') && e('bug:close:1;repo:svnCommit:1,gitCommit:1;doc:create:1;product:close:1;case:run:10;'); // 测试获取本年度 admin dev17 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[4])) && p('', '|') && e('repo:svnCommit:1;doc:create:1;productplan:create:1;case:run:10;'); // 测试获取本年度 admin test18 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[5])) && p('', '|') && e('bug:close:1;repo:svnCommit:1,gitCommit:1;doc:create:1;product:close:1;productplan:create:1;case:run:10;'); // 测试获取本年度 所有用户 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[0])) && p() && e('repo:svnCommit:1;doc:create:1;case:run:10;'); // 测试获取本年度 admin 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[1])) && p() && e('bug:close:1;product:close:1;repo:gitCommit:1;case:run:0;'); // 测试获取本年度 dev17 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[2])) && p() && e('productplan:create:1;case:run:0;'); // 测试获取本年度 test18 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[3])) && p() && e('bug:close:1;repo:svnCommit:1,gitCommit:1;doc:create:1;product:close:1;case:run:10;'); // 测试获取本年度 admin dev17 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[4])) && p() && e('repo:svnCommit:1;doc:create:1;productplan:create:1;case:run:10;'); // 测试获取本年度 admin test18 的贡献数
|
||||
r($report->getUserYearContributionsTest($accounts[5])) && p() && e('bug:close:1;repo:svnCommit:1,gitCommit:1;doc:create:1;product:close:1;productplan:create:1;case:run:10;'); // 测试获取本年度 所有用户 的贡献数
|
||||
|
||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/report.class.php';
|
||||
|
||||
zdTable('action')->gen(200);
|
||||
zdTable('action')->config('action_year')->gen(200);
|
||||
zdTable('product')->gen(20);
|
||||
zdTable('story')->gen(20);
|
||||
zdTable('productplan')->gen(20);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/report.class.php';
|
||||
|
||||
zdTable('todo')->config('todo')->gen(50);
|
||||
zdTable('todo')->config('todo_year')->gen(50);
|
||||
zdTable('user')->gen(1);
|
||||
|
||||
su('admin');
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
title: action.
|
||||
desc: action data.
|
||||
author: Wang XuePeng
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: date
|
||||
note: "日期"
|
||||
range: "(-1D)-(0m):1s"
|
||||
type: timestamp
|
||||
format: "YYYY-MM-DD hh:mm:ss"
|
||||
@@ -0,0 +1,16 @@
|
||||
title: todo.
|
||||
desc: todo data.
|
||||
author: Wang XuePeng
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: account
|
||||
fields:
|
||||
- field: account1
|
||||
range: admin,user{3},test{3},dev{3},pm{3},po{3},td{3},pd{3},qd{3},top{3},outside{3}
|
||||
- field: account2
|
||||
range: "[],1-3,1-3,1-3,1-3,1-3,1-3,1-3,1-3,1-3,1-3"
|
||||
- field: date
|
||||
note: "日期"
|
||||
range: "(-1D)-(0m):1s"
|
||||
type: timestamp
|
||||
format: "YYYY-MM-DD hh:mm:ss"
|
||||
Reference in New Issue
Block a user