You are here

public function MailchimpListsTestCase::testAddSegmentSubscriber in Mailchimp 7.4

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

Tests adding a subscriber to a list segment.

File

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

Class

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

Code

public function testAddSegmentSubscriber() {
  $list_id = '57afe96172';
  $segment_id = 49377;
  $email = 'test@example.org';
  $subscribers_added = mailchimp_segment_add_subscriber($list_id, $segment_id, $email);
  $this
    ->assertEqual($subscribers_added, 1);
}