• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP MarketingListTestHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中MarketingListTestHelper的典型用法代码示例。如果您正苦于以下问题:PHP MarketingListTestHelper类的具体用法?PHP MarketingListTestHelper怎么用?PHP MarketingListTestHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了MarketingListTestHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     // set up data owned by super
     Yii::app()->user->userModel = User::getByUsername('super');
     $account1 = AccountTestHelper::createAccountByNameForOwner('account1', Yii::app()->user->userModel);
     $contact1 = ContactTestHelper::createContactWithAccountByNameForOwner('contact1', Yii::app()->user->userModel, $account1);
     $contact2 = ContactTestHelper::createContactWithAccountByNameForOwner('contact2', Yii::app()->user->userModel, $account1);
     $contact3 = ContactTestHelper::createContactWithAccountByNameForOwner('contact3', Yii::app()->user->userModel, $account1);
     $marketingList1 = MarketingListTestHelper::createMarketingListByName('MarketingList1');
     MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact1);
     MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList1, $contact2);
     $member1 = MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact3);
     static::$superUserMarketingListId = $marketingList1->id;
     static::$superUserMemberId = $member1->id;
     // set up data owned by nobody
     Yii::app()->user->userModel = UserTestHelper::createBasicUser('nobody');
     $account2 = AccountTestHelper::createAccountByNameForOwner('account2', Yii::app()->user->userModel);
     $contact4 = ContactTestHelper::createContactWithAccountByNameForOwner('contact4', Yii::app()->user->userModel, $account2);
     $contact5 = ContactTestHelper::createContactWithAccountByNameForOwner('contact5', Yii::app()->user->userModel, $account2);
     $contact6 = ContactTestHelper::createContactWithAccountByNameForOwner('contact6', Yii::app()->user->userModel, $account2);
     $marketingList2 = MarketingListTestHelper::createMarketingListByName('MarketingList2');
     MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList2, $contact4);
     $member2 = MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList2, $contact5);
     MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList2, $contact6);
     static::$regularUserMarketingListId = $marketingList2->id;
     static::$regularUserMemberId = $member2->id;
     ReadPermissionsOptimizationUtil::rebuild();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:31,代码来源:MarketingListDefaultPortletControllerRegularUserWalkthroughTest.php


示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $nobody = UserTestHelper::createBasicUser('nobody');
     $nobody->setRight('MarketingListsModule', MarketingListsModule::getAccessRight());
     $saved = $nobody->save();
     static::assertTrue($saved);
     Yii::app()->user->userModel = $nobody;
     //Setup test data owned by the super user.
     $account = AccountTestHelper::createAccountByNameForOwner('nobodyAccount', $nobody);
     $marketingList1 = MarketingListTestHelper::createMarketingListByName('MarketingList1', 'MarketingList Description1');
     $marketingList2 = MarketingListTestHelper::createMarketingListByName('MarketingList2', 'MarketingList Description2');
     for ($i = 0; $i < 17; $i++) {
         if ($i % 2) {
             $unsubscribed = 0;
         } else {
             $unsubscribed = 1;
         }
         $contact1 = ContactTestHelper::createContactWithAccountByNameForOwner('nobodyContact1' . $i, $nobody, $account);
         $contact2 = ContactTestHelper::createContactWithAccountByNameForOwner('nobodyContact2' . $i, $nobody, $account);
         MarketingListMemberTestHelper::createMarketingListMember($unsubscribed, $marketingList1, $contact1);
         MarketingListMemberTestHelper::createMarketingListMember($unsubscribed, $marketingList2, $contact2);
     }
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:MarketingListMemberControllerRegularUserWalkthroughTest.php


示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     $super = User::getByUsername('super');
     $super->primaryEmail->emailAddress = '[email protected]';
     $saved = $super->save();
     if (!$saved) {
         throw new FailedToSaveModelException();
     }
     MarketingListTestHelper::createMarketingListByName('testMarketingList');
     $campaign = CampaignTestHelper::createCampaign('testCampaign', 'testSubject', 'testContent', 'testHtmlContent');
     $contact = ContactTestHelper::createContactByNameForOwner('test', $super);
     $emailMessage = EmailMessageTestHelper::createArchivedUnmatchedSentMessage($super);
     $campaignItem = new CampaignItem();
     $campaignItem->contact = $contact;
     $campaignItem->processed = true;
     $campaignItem->campaign = $campaign;
     $campaignItem->emailMessage = $emailMessage;
     $campaignItem->unrestrictedSave();
     if (!$saved) {
         throw new FailedToSaveModelException();
     }
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:CampaignItemSummaryListViewColumnAdapterTest.php


示例4: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     self::$marketingList = MarketingListTestHelper::createMarketingListByName('a new list');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:CampaignTest.php


示例5: setUp

 public function setUp()
 {
     parent::setUp();
     Yii::app()->user->userModel = User::getByUsername('super');
     $emailBoxes = EmailBox::getAll();
     $this->emailBox = $emailBoxes[0];
     $this->marketingList = MarketingListTestHelper::createMarketingListByName('Test Marketing List');
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:8,代码来源:MarketingListGrowthChartDataProviderTest.php


示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     // Delete item from jobQueue, that is created when new user is created
     Yii::app()->jobQueue->deleteAll();
     self::$marketingList = MarketingListTestHelper::createMarketingListByName('a new list');
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:9,代码来源:CampaignTest.php


示例7: testRegularUserAllDefaultControllerActions

 public function testRegularUserAllDefaultControllerActions()
 {
     $marketingList = MarketingListTestHelper::createMarketingListByName('MarketingListName 01', 'MarketingListDescription 01');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/index');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/list');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/create');
     $this->setGetArray(array('id' => $marketingList->id));
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/edit');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/details');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/getInfoToCopyToCampaign');
     $this->setGetArray(array('term' => 'inexistant'));
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/autoComplete');
     $this->setGetArray(array('modalTransferInformation' => array('sourceIdFieldId' => 'Campaign_marketingList_id', 'sourceNameFieldId' => 'Campaign_marketingList_name', 'modalId' => 'modalContainer-edit-form')));
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/modalList');
     $this->resetGetArray();
     $this->user->setRight('MarketingListsModule', MarketingListsModule::getAccessRight());
     $this->assertTrue($this->user->save());
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/index');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/list');
     $this->setGetArray(array('term' => 'inexistant'));
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/autoComplete');
     $this->setGetArray(array('id' => $marketingList->id));
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/getInfoToCopyToCampaign');
     $this->setGetArray(array('modalTransferInformation' => array('sourceIdFieldId' => 'Campaign_marketingList_id', 'sourceNameFieldId' => 'Campaign_marketingList_name', 'modalId' => 'modalContainer-edit-form')));
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/modalList');
     $this->setGetArray(array('id' => $marketingList->id));
     $content = $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/details');
     $this->assertContains('<p>To manage Marketing Lists you must have access to either contacts' . ' or leads. Contact the CRM administrator about this issue.</p>', $content);
     $this->resetGetArray();
     $this->user->setRight('MarketingListsModule', MarketingListsModule::getCreateRight());
     $this->assertTrue($this->user->save());
     $content = $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/create');
     $this->assertContains('<p>To manage Marketing Lists you must have access to either contacts' . ' or leads. Contact the CRM administrator about this issue.</p>', $content);
     $this->user->setRight('ContactsModule', ContactsModule::getAccessRight());
     $this->user->setRight('LeadsModule', LeadsModule::getAccessRight());
     $this->assertTrue($this->user->save());
     $this->setGetArray(array('id' => $marketingList->id));
     $content = $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/details');
     $this->assertNotContains('<p>To manage Marketing Lists you must have access to either contacts' . ' or leads. Contact the CRM administrator about this issue.</p>', $content);
     $this->resetGetArray();
     $this->user->setRight('MarketingListsModule', MarketingListsModule::getCreateRight());
     $this->assertTrue($this->user->save());
     $content = $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/create');
     $this->assertNotContains('<p>To manage Marketing Lists you must have access to either contacts' . ' or leads. Contact the CRM administrator about this issue.</p>', $content);
     $this->setGetArray(array('id' => $marketingList->id));
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/edit');
     $this->user->setRight('MarketingListsModule', MarketingListsModule::getDeleteRight());
     $this->assertTrue($this->user->save());
     $this->runControllerWithRedirectExceptionAndGetUrl('marketingLists/default/delete');
     $this->setGetArray(array('id' => static::$listOwnedBySuper->id));
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/edit');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/details');
     $this->runControllerShouldResultInAccessFailureAndGetContent('marketingLists/default/delete');
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:56,代码来源:MarketingListDefaultControllerRegularUserWalkthroughTest.php


示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description', 'first', '[email protected]');
     MarketingListTestHelper::createMarketingListByName('MarketingListName2', 'MarketingList Description2', 'second', '[email protected]');
     ReadPermissionsOptimizationUtil::rebuild();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:10,代码来源:MarketingListDefaultControllerSuperUserWalkthroughTest.php


示例9: setUp

 public function setUp()
 {
     parent::setUp();
     Yii::app()->user->userModel = User::getByUsername('super');
     $emailBoxes = EmailBox::getAll();
     $this->emailBox = $emailBoxes[0];
     $this->marketingList = MarketingListTestHelper::createMarketingListByName('Test Marketing List');
     $this->campaign = CampaignTestHelper::createCampaign('Test Campaing 01', 'text', 'text exemple');
     $this->autoresponder = AutoresponderTestHelper::createAutoresponder('Test Autoresponder 01', 'text', 'html', 60, Autoresponder::OPERATION_SUBSCRIBE, true);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:10,代码来源:MarketingEmailsInThisListChartDataProviderTest.php


示例10: testRegularUserAllDefaultControllerActions

 public function testRegularUserAllDefaultControllerActions()
 {
     MarketingListTestHelper::createMarketingListByName('MarketingListName02', 'MarketingList Description', 'first', '[email protected]');
     $campaign = CampaignTestHelper::createCampaign('campaign02', 'campaign subject 02', 'text content for campaign 02', 'html content for campaign 02', 'fromCampaign', '[email protected]');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/index');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/list');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/create');
     $this->setGetArray(array('id' => $campaign->id));
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/edit');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/details');
     $this->resetGetArray();
     $this->user->setRight('CampaignsModule', CampaignsModule::getAccessRight());
     $this->assertTrue($this->user->save());
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default');
     $this->assertContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->user->setRight('MarketingListsModule', MarketingListsModule::getAccessRight());
     $this->user->setRight('EmailTemplatesModule', EmailTemplatesModule::getAccessRight());
     $this->assertTrue($this->user->save());
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/index');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/list');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->setGetArray(array('id' => $campaign->id));
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/details');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/details');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->resetGetArray();
     $this->user->setRight('CampaignsModule', CampaignsModule::getCreateRight());
     $this->assertTrue($this->user->save());
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/create');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->setGetArray(array('id' => $campaign->id));
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/details');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->resetGetArray();
     $this->user->setRight('CampaignsModule', CampaignsModule::getCreateRight());
     $this->assertTrue($this->user->save());
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/create');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->setGetArray(array('id' => $campaign->id));
     $content = $this->runControllerWithNoExceptionsAndGetContent('campaigns/default/edit');
     $this->assertNotContains('<p>To manage campaigns you must have access to email templates and ' . 'marketing lists. Contact the CRM administrator about this issue.</p>', $content);
     $this->user->setRight('CampaignsModule', CampaignsModule::getDeleteRight());
     $this->assertTrue($this->user->save());
     $this->runControllerWithRedirectExceptionAndGetUrl('campaigns/default/delete');
     $this->setGetArray(array('id' => static::$campaignOwnedBySuper->id));
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/edit');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/details');
     $this->runControllerShouldResultInAccessFailureAndGetContent('campaigns/default/delete');
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:54,代码来源:CampaignDefaultControllerRegularUserWalkthroughTest.php


示例11: testMarkProcessedCampaignsAsCompletedWithCustomPageSize

 /**
  * @depends testMarkProcessedCampaignsAsCompleted
  */
 public function testMarkProcessedCampaignsAsCompletedWithCustomPageSize()
 {
     Campaign::deleteAll();
     $contact = ContactTestHelper::createContactByNameForOwner('contact 02', $this->user);
     $marketingList = MarketingListTestHelper::populateMarketingListByName('marketingList 02');
     $campaign01 = CampaignTestHelper::createCampaign('campaign 01', 'subject', 'text Content', 'Html Content', null, null, null, Campaign::STATUS_PROCESSING, null, null, $marketingList);
     $this->assertNotNull($campaign01);
     $campaign01Id = $campaign01->id;
     CampaignItemTestHelper::createCampaignItem(1, $campaign01, $contact);
     $campaign02 = CampaignTestHelper::createCampaign('campaign 02', 'subject', 'text Content', 'Html Content', null, null, null, Campaign::STATUS_PROCESSING, null, null, $marketingList);
     $this->assertNotNull($campaign02);
     $campaign02Id = $campaign02->id;
     CampaignItemTestHelper::createCampaignItem(1, $campaign02, $contact);
     $campaign03 = CampaignTestHelper::createCampaign('campaign 03', 'subject', 'text Content', 'Html Content', null, null, null, Campaign::STATUS_PROCESSING, null, null, $marketingList);
     $this->assertNotNull($campaign03);
     $campaign03Id = $campaign03->id;
     $campaign01->forgetAll();
     $campaign02->forgetAll();
     $campaign03->forgetAll();
     Yii::app()->jobQueue->deleteAll();
     $jobs = Yii::app()->jobQueue->getAll();
     $this->assertCount(0, $jobs);
     $this->assertTrue(CampaignsUtil::markProcessedCampaignsAsCompleted(1));
     $jobs = Yii::app()->jobQueue->getAll();
     $this->assertCount(1, $jobs);
     $this->assertEquals('CampaignMarkCompleted', $jobs[5][0]['jobType']);
     $campaign01 = Campaign::getById($campaign01Id);
     $this->assertNotNull($campaign01);
     $this->assertEquals(Campaign::STATUS_COMPLETED, $campaign01->status);
     $campaign02 = Campaign::getById($campaign02Id);
     $this->assertNotNull($campaign02);
     $this->assertEquals(Campaign::STATUS_PROCESSING, $campaign02->status);
     $campaign03 = Campaign::getById($campaign03Id);
     $this->assertNotNull($campaign03);
     $this->assertEquals(Campaign::STATUS_PROCESSING, $campaign03->status);
     $campaign01->forgetAll();
     $campaign02->forgetAll();
     $campaign03->forgetAll();
     Yii::app()->jobQueue->deleteAll();
     $jobs = Yii::app()->jobQueue->getAll();
     $this->assertCount(0, $jobs);
     $this->assertTrue(CampaignsUtil::markProcessedCampaignsAsCompleted());
     $jobs = Yii::app()->jobQueue->getAll();
     $this->assertCount(0, $jobs);
     $campaign01 = Campaign::getById($campaign01Id);
     $this->assertNotNull($campaign01);
     $this->assertEquals(Campaign::STATUS_COMPLETED, $campaign01->status);
     $campaign02 = Campaign::getById($campaign02Id);
     $this->assertNotNull($campaign02);
     $this->assertEquals(Campaign::STATUS_COMPLETED, $campaign02->status);
     $campaign03 = Campaign::getById($campaign03Id);
     $this->assertNotNull($campaign03);
     $this->assertEquals(Campaign::STATUS_COMPLETED, $campaign03->status);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:57,代码来源:CampaignsUtilTest.php


示例12: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     $account = AccountTestHelper::createAccountByNameForOwner('account', $super);
     static::$contact = ContactTestHelper::createContactWithAccountByNameForOwner('contact', $super, $account);
     static::$marketingList = MarketingListTestHelper::createMarketingListByName('marketingList', 'description', 'fromName', '[email protected]', true);
     static::$marketingListMember = MarketingListMemberTestHelper::createMarketingListMember(1, static::$marketingList, static::$contact);
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:EnsureUnsubscribeStateIsRegardedWalkthroughTest.php


示例13: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = User::getByUsername('super');
     $bobby = UserTestHelper::createBasicUser('bobby');
     $sarah = UserTestHelper::createBasicUser('sarah');
     self::$superUserId = $super->id;
     self::$bobbyUserId = $bobby->id;
     self::$sarahUserId = $sarah->id;
     $marketingList = MarketingListTestHelper::createMarketingListByName('testList');
     self::$marketingListId = $marketingList->id;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:WorkflowActionProcessingHelperTest.php


示例14: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     LeadTestHelper::createLeadbyNameForOwner('superLead', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
     //Setup test marketingList
     MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description', 'first', '[email protected]');
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:LeadDetailsAndRelationsPortletViewTest.php


示例15: testSuperUserAllDefaultControllerActions

 public function testSuperUserAllDefaultControllerActions()
 {
     // Test all default controller actions that do not require any POST/GET variables to be passed.
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/index');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/list');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/create');
     MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description', 'first', '[email protected]');
     MarketingListTestHelper::createMarketingListByName('MarketingListName2', 'MarketingList Description2', 'second', '[email protected]');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/index');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/list');
     $this->runControllerWithNoExceptionsAndGetContent('marketingLists/default/create');
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:MarketingListDefaultControllerSuperUserWalkthroughTest.php


示例16: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = User::getByUsername('super');
     $superUserMarketingList = MarketingListTestHelper::createMarketingListByName('superMarketingList');
     static::$superUserMarketingListId = $superUserMarketingList->id;
     $superUserAutoresponder = AutoresponderTestHelper::createAutoresponder('superAutoresponder', 'superText', 'superHtml', 10, Autoresponder::OPERATION_SUBSCRIBE, true, $superUserMarketingList);
     static::$superUserAutoresponderId = $superUserAutoresponder->id;
     Yii::app()->user->userModel = UserTestHelper::createBasicUser('nobody');
     $regularUserMarketingList = MarketingListTestHelper::createMarketingListByName('regularMarketingList');
     static::$regularUserMarketingListId = $regularUserMarketingList->id;
     $regularUserAutoresponder = AutoresponderTestHelper::createAutoresponder('regularAutoresponder', 'regularText', 'regularHtml', 10, Autoresponder::OPERATION_SUBSCRIBE, true, $regularUserMarketingList);
     static::$regularUserAutoresponderId = $regularUserAutoresponder->id;
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:16,代码来源:AutoresponderDefaultControllerRegularUserWalkthroughTest.php


示例17: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     EmailTemplateTestHelper::create('EmailTemplate 01', 'Subject 01', 'Contact', 'Html Content 01', 'Text Content 01');
     EmailTemplateTestHelper::create('EmailTemplate 02', 'Subject 02', 'Contact', 'Html Content 02', 'Text Content 02');
     EmailTemplateTestHelper::create('EmailTemplate 03', 'Subject 03', 'Contact', 'Html Content 03', 'Text Content 03');
     EmailTemplateTestHelper::create('EmailTemplate 04', 'Subject 04', 'Contact', 'Html Content 04', 'Text Content 04');
     EmailTemplateTestHelper::create('EmailTemplate 05', 'Subject 05', 'Contact', 'Html Content 05', 'Text Content 05');
     $marketingList = MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description');
     static::$marketingListId = $marketingList->id;
     AutoresponderTestHelper::createAutoresponder('Subject 01', 'This is text Content 01', 'This is html Content 01', 10, Autoresponder::OPERATION_SUBSCRIBE, true, $marketingList);
     AutoresponderTestHelper::createAutoresponder('Subject 02', 'This is text Content 02', 'This is html Content 02', 5, Autoresponder::OPERATION_UNSUBSCRIBE, false, $marketingList);
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:17,代码来源:AutoresponderDefaultControllerSuperUserWalkthroughTest.php


示例18: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     static::$user = User::getByUsername('super');
     Yii::app()->user->userModel = static::$user;
     $contact = ContactTestHelper::createContactByNameForOwner('contact 01', static::$user);
     $marketingList = MarketingListTestHelper::createMarketingListByName('marketingList 01', 'description 01', 'fromName 01', '[email protected]');
     $autoresponder = AutoresponderTestHelper::createAutoresponder('subject 01', 'textContent 01', 'htmlContent 01', 10, Autoresponder::OPERATION_SUBSCRIBE, 1, $marketingList);
     $processed = 0;
     $processDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time() - 100);
     $autoresponderItem = AutoresponderItemTestHelper::createAutoresponderItem($processed, $processDateTime, $autoresponder, $contact);
     static::$personId = $contact->getClassId('Person');
     static::$autoresponderItemId = $autoresponderItem->id;
     $campaign = CampaignTestHelper::createCampaign('campaign 01', 'subject 01', 'text Content 01', 'html Content 01', 'fromName 01', '[email protected]', null, Campaign::STATUS_ACTIVE, null, null, $marketingList);
     $processed = 0;
     $campaignItem = CampaignItemTestHelper::createCampaignItem($processed, $campaign, $contact);
     static::$campaignItemId = $campaignItem->id;
     AllPermissionsOptimizationUtil::rebuild();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:20,代码来源:TrackingDefaultControllerWalkthroughTest.php


示例19: testCreateAndGetCampaignItemActivityWithCampaignItemById

 public function testCreateAndGetCampaignItemActivityWithCampaignItemById()
 {
     $contact = ContactTestHelper::createContactByNameForOwner('contact 01', $this->user);
     $marketingList = MarketingListTestHelper::createMarketingListByName('marketingList 01');
     $campaign = CampaignTestHelper::createCampaign('campaign 01', 'subject 01', 'text Content 01', 'html Content 01', 'fromName 01', '[email protected]', null, null, null, null, $marketingList);
     $processed = 0;
     $campaignItem = CampaignItemTestHelper::createCampaignItem($processed, $campaign, $contact);
     $campaignItemActivity = new CampaignItemActivity();
     $campaignItemActivity->type = CampaignItemActivity::TYPE_CLICK;
     $campaignItemActivity->quantity = 1;
     $campaignItemActivity->campaignItem = $campaignItem;
     $campaignItemActivity->latestSourceIP = '121.212.122.112';
     $this->assertTrue($campaignItemActivity->save());
     $id = $campaignItemActivity->id;
     unset($campaignItemActivity);
     $campaignItemActivity = CampaignItemActivity::getById($id);
     $this->assertEquals(CampaignItemActivity::TYPE_CLICK, $campaignItemActivity->type);
     $this->assertEquals(1, $campaignItemActivity->quantity);
     $this->assertEquals($campaignItem, $campaignItemActivity->campaignItem);
     $this->assertEquals('121.212.122.112', $campaignItemActivity->latestSourceIP);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:21,代码来源:CampaignItemActivityTest.php


示例20: testCreateAndGetAutoresponderItemActivityWithAutoresponderItemById

 public function testCreateAndGetAutoresponderItemActivityWithAutoresponderItemById()
 {
     $contact = ContactTestHelper::createContactByNameForOwner('contact 01', $this->user);
     $marketingList = MarketingListTestHelper::createMarketingListByName('marketingList 01');
     $autoresponder = AutoresponderTestHelper::createAutoresponder('subject 01', 'text content', 'html content', 1, Autoresponder::OPERATION_SUBSCRIBE, true, $marketingList);
     $processed = 0;
     $processDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time() - 100);
     $autoresponderItem = AutoresponderItemTestHelper::createAutoresponderItem($processed, $processDateTime, $autoresponder, $contact);
     $autoresponderItemActivity = new AutoresponderItemActivity();
     $autoresponderItemActivity->type = AutoresponderItemActivity::TYPE_CLICK;
     $autoresponderItemActivity->quantity = 1;
     $autoresponderItemActivity->latestSourceIP = '11.12.13.14';
     $autoresponderItemActivity->autoresponderItem = $autoresponderItem;
     $this->assertTrue($autoresponderItemActivity->save());
     $id = $autoresponderItemActivity->id;
     unset($autoresponderItemActivity);
     $autoresponderItemActivity = AutoresponderItemActivity::getById($id);
     $this->assertEquals(AutoresponderItemActivity::TYPE_CLICK, $autoresponderItemActivity->type);
     $this->assertEquals(1, $autoresponderItemActivity->quantity);
     $this->assertEquals('11.12.13.14', $autoresponderItemActivity->latestSourceIP);
     $this->assertEquals($autoresponderItem, $autoresponderItemActivity->autoresponderItem);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:22,代码来源:AutoresponderItemActivityTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Marketplace类代码示例发布时间:2022-05-23
下一篇:
PHP MarketingList类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap