本文整理汇总了PHP中EmailTemplate::cleanBean方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailTemplate::cleanBean方法的具体用法?PHP EmailTemplate::cleanBean怎么用?PHP EmailTemplate::cleanBean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmailTemplate
的用法示例。
在下文中一共展示了EmailTemplate::cleanBean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testXssFilterBean
/**
* @dataProvider xssData
*/
public function testXssFilterBean($before, $after)
{
$bean = new EmailTemplate();
$bean->body_html = to_html($before);
$bean->cleanBean();
$this->assertEquals(to_html($after), $bean->body_html);
}
示例2: testCleanBean
/**
* Test asserts that body_html has variables after cleanBean call
*
* @group 60152
* @dataProvider dataProvider
* @return void
*/
public function testCleanBean($html, $needle)
{
$bean = new EmailTemplate();
$bean->body_html = $html;
$bean->cleanBean();
$this->assertContains($needle, $bean->body_html);
}
示例3: testcleanBean
public function testcleanBean()
{
$emailTemplate = new EmailTemplate();
//test without body_html attribute
$emailTemplate->cleanBean();
$this->assertEquals('', $emailTemplate->body_html);
//test with body_html attribute
$emailTemplate->body_html = '<h1>text</h1>';
$emailTemplate->cleanBean();
$this->assertEquals('<h1>text</h1>', $emailTemplate->body_html);
}