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