znt/module/svn/test/model/getrepologs.php

30 lines
987 B
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=测试 svnModel::getRepoLogs();
timeout=0
cid=18716
- 步骤1正常提交ID为0的情况 @0
- 步骤2正常提交ID为1的情况 @0
- 步骤3负数提交ID的边界情况 @0
- 步骤4大数值提交ID的边界情况 @0
- 步骤5测试空日志结果的情况 @0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
zenData('repo')->loadYaml('repo')->gen(3);
su('admin');
$svnTest = new svnModelTest();
r($svnTest->getRepoLogsTest(0)) && p() && e('0'); // 步骤1正常提交ID为0的情况
r($svnTest->getRepoLogsTest(1)) && p() && e('0'); // 步骤2正常提交ID为1的情况
r($svnTest->getRepoLogsTest(-1)) && p() && e('0'); // 步骤3负数提交ID的边界情况
r($svnTest->getRepoLogsTest(99999)) && p() && e('0'); // 步骤4大数值提交ID的边界情况
r($svnTest->getRepoLogsTest(0)) && p() && e('0'); // 步骤5测试空日志结果的情况