本文整理匯總了PHP中Opportunity::set_notification_body方法的典型用法代碼示例。如果您正苦於以下問題:PHP Opportunity::set_notification_body方法的具體用法?PHP Opportunity::set_notification_body怎麽用?PHP Opportunity::set_notification_body使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Opportunity
的用法示例。
在下文中一共展示了Opportunity::set_notification_body方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testset_notification_body
public function testset_notification_body()
{
$opportunity = new Opportunity();
//test with attributes preset and verify template variables are set accordingly
$opportunity->name = 'test';
$opportunity->amount = '100';
$opportunity->date_closed = '2015-02-11 17:30:00';
$opportunity->description = 'tes description';
$opportunity->sales_stage = 'Value Proposition';
$result = $opportunity->set_notification_body(new Sugar_Smarty(), $opportunity);
$this->assertEquals($opportunity->name, $result->_tpl_vars['OPPORTUNITY_NAME']);
$this->assertEquals($opportunity->amount, $result->_tpl_vars['OPPORTUNITY_AMOUNT']);
$this->assertEquals($opportunity->date_closed, $result->_tpl_vars['OPPORTUNITY_CLOSEDATE']);
$this->assertEquals($opportunity->sales_stage, $result->_tpl_vars['OPPORTUNITY_STAGE']);
$this->assertEquals($opportunity->description, $result->_tpl_vars['OPPORTUNITY_DESCRIPTION']);
}