You are here

public function MailchimpListsSubscriptionTest::testIsSubscribed in Mailchimp 8

Same name and namespace in other branches
  1. 2.x modules/mailchimp_lists/tests/src/Functional/MailchimpListsSubscriptionTest.php \Drupal\Tests\mailchimp_lists\Functional\MailchimpListsSubscriptionTest::testIsSubscribed()

Tests the status of a member's subscription to a list.

File

modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php, line 35

Class

MailchimpListsSubscriptionTest
Tests list subscription functionality.

Namespace

Drupal\Tests\mailchimp_lists\Functional

Code

public function testIsSubscribed() {
  $list_id = '57afe96172';
  $email = 'test@example.org';
  $subscribed = mailchimp_is_subscribed($list_id, $email);
  $this
    ->assertTrue($subscribed, 'Tested user is subscribed to list.');
}