本文整理汇总了PHP中EmailTemplate::parse_tracker_urls方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailTemplate::parse_tracker_urls方法的具体用法?PHP EmailTemplate::parse_tracker_urls怎么用?PHP EmailTemplate::parse_tracker_urls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmailTemplate
的用法示例。
在下文中一共展示了EmailTemplate::parse_tracker_urls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testParseTrackerUrl
/**
* Testing EmailTemplate::parse_tracker_urls
* @group 46984
* @dataProvider templatesProvider
*/
public function testParseTrackerUrl($data, $expects, $result)
{
$et = new EmailTemplate();
$res = $et->parse_tracker_urls($data[0], $data[1], $data[2], $data[3]);
if ($result) {
$this->assertEquals($expects, $res);
} else {
$this->assertNotEquals($expects, $res);
}
}
示例2: testparse_email_templateAndParse_tracker_urls
public function testparse_email_templateAndParse_tracker_urls()
{
$emailTemplate = new EmailTemplate();
//test parse_email_template
$account = new Account();
$macro_nv = array();
$expected = array('subject' => 'test subject', 'body_html' => 'test html', 'body' => 'test body text');
$actual = $emailTemplate->parse_email_template(array('subject' => 'test subject', 'body_html' => 'test html', 'body' => 'test body text'), 'Accounts', $account, $macro_nv);
$this->assertSame($expected, $actual);
//test Parse_tracker_urls
$tracker_url_template = 'localhost/index.php?entryPoint=campaign_trackerv2&track=%s&identifier=tracker_key';
$removeme_url_template = 'localhost/index.php?entryPoint=removeme&identifier=tracker_key';
$tracker_urls = array();
$result = $emailTemplate->parse_tracker_urls($actual, $tracker_url_template, $tracker_urls, $removeme_url_template);
$this->assertSame($expected, $result);
}