当前位置: 首页>>代码示例>>PHP>>正文


PHP Campaign::forgetAll方法代码示例

本文整理汇总了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();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:10,代码来源:CampaignGenerateDueCampaignItemsJob.php

示例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);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:25,代码来源:CampaignTest.php


注:本文中的Campaign::forgetAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。