znt/module/build/test/model/getrelatedreleases.php

33 lines
1.4 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=测试 buildModel::getRelatedReleases();
timeout=0
cid=15498
- 步骤1基本产品ID数组查询 @0
- 步骤2基本产品ID单个查询 @0
- 步骤3空产品ID列表查询 @0
- 步骤4不存在的产品ID查询 @0
- 步骤5project对象过滤查询 @0
- 步骤6execution对象过滤查询 @0
- 步骤7带参数nowaitrelease过滤 @0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
// su('admin'); // 跳过用户登录避免数据库错误
$buildTest = new buildModelTest();
r($buildTest->getRelatedReleasesTest(array(1))) && p() && e('0'); // 步骤1基本产品ID数组查询
r($buildTest->getRelatedReleasesTest(1)) && p() && e('0'); // 步骤2基本产品ID单个查询
r($buildTest->getRelatedReleasesTest(array())) && p() && e('0'); // 步骤3空产品ID列表查询
r($buildTest->getRelatedReleasesTest(array(999))) && p() && e('0'); // 步骤4不存在的产品ID查询
r($buildTest->getRelatedReleasesTest(array(1), '', false, 'project', 11)) && p() && e('0'); // 步骤5project对象过滤查询
r($buildTest->getRelatedReleasesTest(array(1), '', false, 'execution', 101)) && p() && e('0'); // 步骤6execution对象过滤查询
r($buildTest->getRelatedReleasesTest(array(1), '', false, '', 0, 'nowaitrelease')) && p() && e('0'); // 步骤7带参数nowaitrelease过滤