znt/module/repo/test/model/rmclientversionfile.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=测试 repoModel::rmClientVersionFile();
timeout=0
cid=18092
- 测试步骤1有文件且文件存在 @1
- 测试步骤2有文件路径但文件不存在 @1
- 测试步骤3session中为空字符串 @1
- 测试步骤4session中没有该属性 @1
- 测试步骤5特殊字符文件名处理 @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$repo = new repoModelTest();
r($repo->rmClientVersionFileTest('existing_file')) && p() && e('1'); //测试步骤1有文件且文件存在
r($repo->rmClientVersionFileTest('nonexistent_file')) && p() && e('1'); //测试步骤2有文件路径但文件不存在
r($repo->rmClientVersionFileTest('empty_string')) && p() && e('1'); //测试步骤3session中为空字符串
r($repo->rmClientVersionFileTest('null')) && p() && e('1'); //测试步骤4session中没有该属性
r($repo->rmClientVersionFileTest('special_chars')) && p() && e('1'); //测试步骤5特殊字符文件名处理