znt/module/convert/test/model/getjirastatuslist.php

29 lines
1 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::getJiraStatusList();
timeout=0
cid=15782
- 步骤1正常情况 @2
- 步骤2空relations参数 @0
- 步骤3step不存在 @0
- 步骤4没有zentaoObject键 @0
- 步骤5匹配数据 @2
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$convertTest = new convertModelTest();
r($convertTest->getJiraStatusListTest(1, array('zentaoObject' => array(1 => 'story')))) && p() && e('2'); // 步骤1正常情况
r($convertTest->getJiraStatusListTest(1, array())) && p() && e('0'); // 步骤2空relations参数
r($convertTest->getJiraStatusListTest(999, array('zentaoObject' => array(1 => 'story')))) && p() && e('0'); // 步骤3step不存在
r($convertTest->getJiraStatusListTest(1, array('otherKey' => 'value'))) && p() && e('0'); // 步骤4没有zentaoObject键
r($convertTest->getJiraStatusListTest(2, array('zentaoObject' => array(2 => 'task')))) && p() && e('2'); // 步骤5匹配数据