znt/module/mail/test/model/send.php

29 lines
1.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=测试 mailModel::send();
timeout=0
cid=17016
- 执行mailTest模块的sendTest方法参数是'admin', 'test subject', 'test body' @0
- 执行mailTest模块的sendTest方法参数是'admin', 'test subject', 'test body' @1
- 执行mailTest模块的sendTest方法参数是'admin', 'test subject', 'test body', '', false, array @0
- 执行mailTest模块的sendTest方法参数是'', 'test subject', 'test body' @0
- 执行mailTest模块的sendTest方法参数是'admin', 'test subject', 'test body' 属性nonexistent @~~
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$mailTest = new mailModelTest();
r($mailTest->sendTest('admin', 'test subject', 'test body')) && p() && e('0');
r($mailTest->sendTest('admin', 'test subject', 'test body')) && p() && e('1');
r($mailTest->sendTest('admin', 'test subject', 'test body', '', false, array(), true)) && p() && e('0');
r($mailTest->sendTest('', 'test subject', 'test body')) && p() && e('0');
r($mailTest->sendTest('admin', 'test subject', 'test body')) && p('nonexistent') && e('~~');