You are here

public function MailchimpListsTestCase::testUnsubscribe in Mailchimp 7.4

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

Tests unsubscribing a member from a list.

File

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

Class

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

Code

public function testUnsubscribe() {
  $list_id = '57afe96172';
  $email = 'test@example.org';
  $unsubscribed = mailchimp_unsubscribe_member($list_id, $email);
  $this
    ->assertTrue($unsubscribed, 'Tested user unsubscription.');
}