Files
2025-11-14 13:05:25 +08:00

33 lines
1.2 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=测试 convertModel::getJiraDataFromFile();
timeout=0
cid=15777
- 步骤1:不存在的模块,文件不存在返回空数组 @0
- 步骤2:空模块名参数返回空数组 @0
- 步骤3build模块映射为version文件名 @0
- 步骤4file模块映射为fileattachment文件名 @0
- 步骤5:分页参数测试 @0
*/
// 1. 导入依赖
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/convert.unittest.class.php';
// 2. 用户登录
su('admin');
// 3. 创建测试实例
$convertTest = new convertTest();
// 4. 测试步骤
r($convertTest->getJiraDataFromFileTest('nonexistent')) && p() && e('0'); // 步骤1:不存在的模块,文件不存在返回空数组
r($convertTest->getJiraDataFromFileTest('')) && p() && e('0'); // 步骤2:空模块名参数返回空数组
r($convertTest->getJiraDataFromFileTest('build')) && p() && e('0'); // 步骤3build模块映射为version文件名
r($convertTest->getJiraDataFromFileTest('file')) && p() && e('0'); // 步骤4file模块映射为fileattachment文件名
r($convertTest->getJiraDataFromFileTest('user', 0, 10)) && p() && e('0'); // 步骤5:分页参数测试