znt/module/file/test/model/getpathofimportedfile.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=测试 fileModel::getPathOfImportedFile();
timeout=0
cid=16511
- 步骤1正常获取导入路径 @tmp/import
- 步骤2验证路径以import结尾 @1
- 步骤3多次调用一致性 @1
- 步骤4验证包含tmp前缀 @1
- 步骤5验证路径结构完整性 @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$file = new fileModelTest();
r($file->getPathOfImportedFileTest()) && p() && e('tmp/import'); // 步骤1正常获取导入路径
r($file->getPathOfImportedFileEndsWithImportTest()) && p() && e('1'); // 步骤2验证路径以import结尾
r($file->getPathOfImportedFileConsistencyTest()) && p() && e('1'); // 步骤3多次调用一致性
r($file->getPathOfImportedFileContainsTmpTest()) && p() && e('1'); // 步骤4验证包含tmp前缀
r($file->getPathOfImportedFileValidStructureTest()) && p() && e('1'); // 步骤5验证路径结构完整性