znt/module/bug/test/zen/processrepoissueactions.php

38 lines
1.3 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=测试 bugZen::processRepoIssueActions();
timeout=0
cid=15469
- 步骤1正常仓库ID属性repoID @1
- 步骤2边界值0属性repoID @0
- 步骤3负数ID属性repoID @-1
- 步骤4验证主要操作
- 第mainActions条的0属性 @confirm
- 第mainActions条的1属性 @assignTo
- 第mainActions条的2属性 @resolve
- 第mainActions条的3属性 @close
- 第mainActions条的4属性 @activate
- 步骤5验证后缀操作第suffixActions条的0属性 @delete
*/
// 1. 导入依赖
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/zen.class.php';
// 2. 用户登录
su('admin');
// 3. 创建测试实例
$bugTest = new bugZenTest();
// 4. 执行测试步骤
r($bugTest->processRepoIssueActionsTest(1)) && p('repoID') && e('1'); // 步骤1正常仓库ID
r($bugTest->processRepoIssueActionsTest(0)) && p('repoID') && e('0'); // 步骤2边界值0
r($bugTest->processRepoIssueActionsTest(-1)) && p('repoID') && e('-1'); // 步骤3负数ID
r($bugTest->processRepoIssueActionsTest(100)) && p('mainActions:0,1,2,3,4') && e('confirm,assignTo,resolve,close,activate'); // 步骤4验证主要操作
r($bugTest->processRepoIssueActionsTest(200)) && p('suffixActions:0') && e('delete'); // 步骤5验证后缀操作