You are here

public function MailChimpTest::listBatchSubscribe in Mailchimp 7.2

Batch subscribe method.

Overrides MCAPI::listBatchSubscribe

File

tests/mailchimp_tests.inc, line 86
A virtual MailChimp API implementation for use in testing.

Class

MailChimpTest
@file A virtual MailChimp API implementation for use in testing.

Code

public function listBatchSubscribe($id, $batch, $double_optin = TRUE, $update_existing = FALSE, $replace_interests = TRUE) {
  foreach ($batch as $sub) {
    $email = isset($sub['EMAIL']) ? $sub['EMAIL'] : NULL;
    $this
      ->listSubscribe($id, $email, $merge_vars = $sub, 'html', TRUE, TRUE);
  }
}