本文整理匯總了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']);
}