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

27 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::setMTA();
timeout=0
cid=17023
- 步骤1验证setMTA方法基本功能和CharSet设置属性CharSet @utf-8
- 步骤2验证单例模式实现机制 @1
- 步骤3验证SMTP主机地址配置属性Host @localhost
- 步骤4验证Gmail配置的CharSet设置属性CharSet @UTF-8
- 步骤5验证自定义字符集配置属性CharSet @gbk
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
$mailTest = new mailModelTest();
r($mailTest->setMTATest()) && p('CharSet') && e('utf-8'); // 步骤1验证setMTA方法基本功能和CharSet设置
r($mailTest->mtaSingletonTest()) && p() && e('1'); // 步骤2验证单例模式实现机制
r($mailTest->setMTATest()) && p('Host') && e('localhost'); // 步骤3验证SMTP主机地址配置
r($mailTest->setMTAGmailTest()) && p('CharSet') && e('UTF-8'); // 步骤4验证Gmail配置的CharSet设置
r($mailTest->setMTACharsetTest('gbk')) && p('CharSet') && e('gbk'); // 步骤5验证自定义字符集配置