本文整理汇总了PHP中Call::set_notification_body方法的典型用法代码示例。如果您正苦于以下问题:PHP Call::set_notification_body方法的具体用法?PHP Call::set_notification_body怎么用?PHP Call::set_notification_body使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Call
的用法示例。
在下文中一共展示了Call::set_notification_body方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testset_notification_body
public function testset_notification_body()
{
$call = new Call();
//test with attributes preset and verify template variables are set accordingly
$call->name = 'test';
$call->duration_hours = '1';
$call->duration_minutes = '10';
$call->status = 'Planned';
$call->description = 'some text';
$call->date_start = '2015-09-01 00:02:03';
$call->current_notify_user = new User(1);
$call->current_notify_user->new_assigned_user_name = 'Admin';
$result = $call->set_notification_body(new Sugar_Smarty(), $call);
$this->assertEquals($call->name, $result->_tpl_vars['CALL_SUBJECT']);
$this->assertEquals($call->current_notify_user->new_assigned_user_name, $result->_tpl_vars['CALL_TO']);
$this->assertEquals($call->duration_hours, $result->_tpl_vars['CALL_HOURS']);
$this->assertEquals($call->duration_minutes, $result->_tpl_vars['CALL_MINUTES']);
$this->assertEquals($call->status, $result->_tpl_vars['CALL_STATUS']);
$this->assertEquals('09/01/2015 00:02 UTC(+00:00)', $result->_tpl_vars['CALL_STARTDATE']);
$this->assertEquals($call->description, $result->_tpl_vars['CALL_DESCRIPTION']);
}