Files
EasySoft-ZenTaoPMS/module/convert/test/model/getjiracustomfield.php
T
2025-09-15 15:06:14 +08:00

33 lines
1.5 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=测试 convertModel::getJiraCustomField();
timeout=0
cid=0
- 步骤1:开源版返回空数组 @0
- 步骤2zentaoObject为空返回空数组 @0
- 步骤3step不在zentaoObject keys中返回空数组 @0
- 步骤4:正常情况获取自定义字段 @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. 🔴 强制要求:必须包含至少5个测试步骤
r($convertTest->getJiraCustomFieldTest(1, array())) && p() && e('0'); // 步骤1:开源版返回空数组
r($convertTest->getJiraCustomFieldTest(1, array('zentaoObject' => array()))) && p() && e('0'); // 步骤2zentaoObject为空返回空数组
r($convertTest->getJiraCustomFieldTest(5, array('zentaoObject' => array(1 => 'story', 2 => 'task')))) && p() && e('0'); // 步骤3step不在zentaoObject keys中返回空数组
r($convertTest->getJiraCustomFieldTest(1, array('zentaoObject' => array(1 => 'story', 2 => 'task')))) && p() && e('0'); // 步骤4:正常情况获取自定义字段
r(count($convertTest->getJiraCustomFieldTest(1, array('zentaoObject' => array(1 => 'story', 2 => 'task'))))) && p() && e('0'); // 步骤5:获取自定义字段数量验证