You are here

public function MailchimpListsTestCase::testAddSegmentBatchSubscribers in Mailchimp 7.5

Same name and namespace in other branches
  1. 7.3 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testAddSegmentBatchSubscribers()
  2. 7.4 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testAddSegmentBatchSubscribers()

Tests adding batch subscribers to a list segment.

File

modules/mailchimp_lists/tests/mailchimp_lists.test, line 234
Test class and methods for the Mailchimp Lists/Audiences module.

Class

MailchimpListsTestCase
@file Test class and methods for the Mailchimp Lists/Audiences module.

Code

public function testAddSegmentBatchSubscribers() {
  $list_id = '57afe96172';
  $segment_id = 49377;
  $batch = array(
    'user1@example.org',
    'user2@example.org',
    'user3@example.org',
  );
  $batch_subscribers = mailchimp_segment_batch_add_subscribers($list_id, $segment_id, $batch);
  $this
    ->assertEqual($batch_subscribers, count($batch));
}