znt/module/transfer/test/model/createtmpfile.php

29 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=测试 transferModel::createTmpFile();
timeout=0
cid=19311
- 执行transferTest模块的createTmpFileTest方法参数是array @Success
- 执行transferTest模块的createTmpFileTest方法参数是array @Success
- 执行transferTest模块的createTmpFileTest方法参数是array @Success
- 执行transferTest模块的createTmpFileTest方法参数是array @Success
- 执行transferTest模块的createTmpFileTest方法参数是array @Success
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$transferTest = new transferModelTest();
r($transferTest->createTmpFileTest(array(1 => (object)array('title' => '测试标题1', 'status' => 'active')))) && p() && e('Success');
r($transferTest->createTmpFileTest(array())) && p() && e('Success');
r($transferTest->createTmpFileTest(array(1 => (object)array('title' => '大量数据测试', 'content' => str_repeat('测试内容', 1000))))) && p() && e('Success');
r($transferTest->createTmpFileTest(array(1 => (object)array('title' => 'Test!@#$%^&*()', 'desc' => '特殊字符"\'\\/')))) && p() && e('Success');
r($transferTest->createTmpFileTest(array(2 => (object)array('title' => '覆盖测试', 'status' => 'new')))) && p() && e('Success');