#!/usr/bin/env php
HTML tags & entities' 属性Subject @HTML tags & entities
- 执行mail模块的setSubjectTest方法,参数是'This is a very long subject line that contains multiple words and should be handled properly by the setSubject method without any issues' 属性Subject @This is a very long subject line that contains multiple words and should be handled properly by the setSubject method without any issues
- 执行mail模块的setSubjectTest方法,参数是'中文主题测试:包含中文字符的邮件主题' 属性Subject @中文主题测试:包含中文字符的邮件主题
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$mail = new mailModelTest();
r($mail->setSubjectTest('Normal subject text')) && p('Subject') && e('Normal subject text');
r($mail->setSubjectTest('Test with \\slash')) && p('Subject') && e('Test with slash');
r($mail->setSubjectTest('')) && p('Subject') && e('~~');
r($mail->setSubjectTest('Test \\\"escaped quotes\\\"')) && p('Subject') && e('Test \"escaped quotes\"');
r($mail->setSubjectTest('HTML tags & entities')) && p('Subject') && e('HTML tags & entities');
r($mail->setSubjectTest('This is a very long subject line that contains multiple words and should be handled properly by the setSubject method without any issues')) && p('Subject') && e('This is a very long subject line that contains multiple words and should be handled properly by the setSubject method without any issues');
r($mail->setSubjectTest('中文主题测试:包含中文字符的邮件主题')) && p('Subject') && e('中文主题测试:包含中文字符的邮件主题');