Files
EasySoft-ZenTaoPMS/module/tutorial/test/model/getexecutionburndata.php
T
2025-11-14 13:05:25 +08:00

43 lines
1.9 KiB
PHP
Executable File
Raw 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=测试 tutorialModel::getExecutionBurnData();
timeout=0
cid=19430
- 步骤1:正常情况-5个日期
- 第2024-01-01条的value属性 @6
- 第2024-01-05条的value属性 @2
- 步骤2:空数组 @0
- 步骤3:单个日期
- 第2024-01-01条的value属性 @6
- 第2024-01-01条的left属性 @7
- 步骤43个不连续日期
- 第2024-01-01条的value属性 @6
- 第2024-01-03条的value属性 @5
- 第2024-01-05条的value属性 @4
- 步骤510个日期超出范围
- 第2024-01-01条的value属性 @6
- 第2024-01-08条的value属性 @-1
- 第2024-01-10条的value属性 @-3
*/
// 1. 导入依赖(路径固定,不可修改)
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/tutorial.unittest.class.php';
// 2. 用户登录(选择合适角色)
su('admin');
// 3. 创建测试实例(变量名与模块名一致)
$tutorialTest = new tutorialTest();
// 4. 🔴 强制要求:必须包含至少5个测试步骤
r($tutorialTest->getExecutionBurnDataTest(array('2024-01-01', '2024-01-02', '2024-01-03', '2024-01-04', '2024-01-05'))) && p('2024-01-01:value;2024-01-05:value') && e('6;2'); // 步骤1:正常情况-5个日期
r($tutorialTest->getExecutionBurnDataTest(array())) && p() && e('0'); // 步骤2:空数组
r($tutorialTest->getExecutionBurnDataTest(array('2024-01-01'))) && p('2024-01-01:value;2024-01-01:left') && e('6;7'); // 步骤3:单个日期
r($tutorialTest->getExecutionBurnDataTest(array('2024-01-01', '2024-01-03', '2024-01-05'))) && p('2024-01-01:value;2024-01-03:value;2024-01-05:value') && e('6;5;4'); // 步骤43个不连续日期
r($tutorialTest->getExecutionBurnDataTest(array('2024-01-01', '2024-01-02', '2024-01-03', '2024-01-04', '2024-01-05', '2024-01-06', '2024-01-07', '2024-01-08', '2024-01-09', '2024-01-10'))) && p('2024-01-01:value;2024-01-08:value;2024-01-10:value') && e('6;-1;-3'); // 步骤510个日期超出范围