znt/module/file/test/model/setsavepath.php

29 lines
1.2 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::setSavePath();
timeout=0
cid=16535
- 步骤1测试默认公司ID(1)的savePath设置 @/data/upload/1/
- 步骤2测试不同公司ID(2)的savePath设置 @/data/upload/2/
- 步骤3测试公司ID为3的savePath设置 @/data/upload/3/
- 步骤4测试公司ID为10的savePath设置 @/data/upload/10/
- 步骤5测试重新设置回默认公司ID的savePath @/data/upload/1/
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$file = new fileModelTest();
r($file->setSavePathTest()) && p() && e('/data/upload/1/'); // 步骤1测试默认公司ID(1)的savePath设置
r($file->setSavePathTest(2)) && p() && e('/data/upload/2/'); // 步骤2测试不同公司ID(2)的savePath设置
r($file->setSavePathTest(3)) && p() && e('/data/upload/3/'); // 步骤3测试公司ID为3的savePath设置
r($file->setSavePathTest(10)) && p() && e('/data/upload/10/'); // 步骤4测试公司ID为10的savePath设置
r($file->setSavePathTest(1)) && p() && e('/data/upload/1/'); // 步骤5测试重新设置回默认公司ID的savePath