本文整理汇总了PHP中Campaign::forgetAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::forgetAll方法的具体用法?PHP Campaign::forgetAll怎么用?PHP Campaign::forgetAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::forgetAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* @see BaseJob::run()
*/
public function run()
{
// we need either this or need to call forget() on each campaign we are processing inside tests
Campaign::forgetAll();
$util = new CampaignItemsUtil();
return $util->generateCampaignItemsForDueCampaigns();
}
示例2: testHtmlContentGetsSavedCorrectly
/**
* @depends testCreateAndGetCampaignListById
*/
public function testHtmlContentGetsSavedCorrectly()
{
$randomData = ZurmoRandomDataUtil::getRandomDataByModuleAndModelClassNames('EmailTemplatesModule', 'EmailTemplate');
$htmlContent = $randomData['htmlContent'][count($randomData['htmlContent']) - 1];
$campaign = new Campaign();
$campaign->name = 'Another Test Campaign Name';
$campaign->supportsRichText = 0;
$campaign->status = Campaign::STATUS_ACTIVE;
$campaign->fromName = 'Another From Name';
$campaign->fromAddress = 'anotherfrom@zurmo.com';
$campaign->fromName = 'From Name2';
$campaign->fromAddress = 'from2@zurmo.com';
$campaign->subject = 'Another Test subject';
$campaign->textContent = 'Text Content';
$campaign->htmlContent = $htmlContent;
$campaign->marketingList = self::$marketingList;
$this->assertTrue($campaign->save());
$campaignId = $campaign->id;
$campaign->forgetAll();
$campaign = Campaign::getById($campaignId);
$this->assertEquals($htmlContent, $campaign->htmlContent);
}