public function MailchimpListsSubscriptionTest::testUnsubscribe in Mailchimp 2.x
Same name and namespace in other branches
- 8 modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php \Drupal\Tests\mailchimp_lists\Functional\MailchimpListsSubscriptionTest::testUnsubscribe()
Tests unsubscribing a member from a list.
File
- modules/
mailchimp_lists/ tests/ src/ Functional/ MailchimpListsSubscriptionTest.php, line 89
Class
- MailchimpListsSubscriptionTest
- Tests list subscription functionality.
Namespace
Drupal\Tests\mailchimp_lists\FunctionalCode
public function testUnsubscribe() {
$list_id = '57afe96172';
$email = 'test@example.org';
$unsubscribed = mailchimp_unsubscribe($list_id, $email);
$this
->assertNotEmpty($unsubscribed, 'Tested user unsubscription.');
}