znt/module/pivot/test/zen/workload.php

41 lines
1.5 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 pivotZen::workload();
timeout=0
cid=17467
- 执行pivotTest模块的workloadTest方法参数是'', '', 0, 0, 0, 'assign'
- 属性assign @assign
- 属性workhour @7.0
- 执行pivotTest模块的workloadTest方法参数是'2025-10-01', '2025-10-31', 0, 0, 0, 'assign'
- 属性begin @2025-10-01
- 属性end @2025-10-31
- 执行pivotTest模块的workloadTest方法参数是'2025-11-01', '2025-11-15', 10, 8, 0, 'assign'
- 属性days @10
- 属性workhour @8
- 执行pivotTest模块的workloadTest方法参数是'', '', 0, 0, 1, 'assign'
- 属性dept @1
- 属性assign @assign
- 执行pivotTest模块的workloadTest方法参数是'', '', 0, 0, 0, 'finishedBy' 属性assign @finishedBy
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/pivotzen.unittest.class.php';
zenData('user')->gen(10);
zenData('dept')->gen(5);
zenData('task')->gen(20);
su('admin');
$pivotTest = new pivotZenTest();
r($pivotTest->workloadTest('', '', 0, 0, 0, 'assign')) && p('assign,workhour') && e('assign,7.0');
r($pivotTest->workloadTest('2025-10-01', '2025-10-31', 0, 0, 0, 'assign')) && p('begin,end') && e('2025-10-01,2025-10-31');
r($pivotTest->workloadTest('2025-11-01', '2025-11-15', 10, 8, 0, 'assign')) && p('days,workhour') && e('10,8');
r($pivotTest->workloadTest('', '', 0, 0, 1, 'assign')) && p('dept,assign') && e('1,assign');
r($pivotTest->workloadTest('', '', 0, 0, 0, 'finishedBy')) && p('assign') && e('finishedBy');