You are here

protected function MailChimpTest::defaultLists in Mailchimp 7.2

Creates initial list values.

Return value

array Basic lists.

1 call to MailChimpTest::defaultLists()
MailChimpTest::loadLists in tests/mailchimp_tests.inc
Loads list values, initializing if necessary.

File

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

Class

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

Code

protected function defaultLists() {
  $default_mergevars = array();
  $default_mergevars[] = array(
    'name' => 'Email',
    'order' => 0,
    'tag' => 'EMAIL',
    'req' => TRUE,
    'webid' => 'test',
    'field_type' => 'text',
    'size' => 40,
    'default' => '',
    'public' => TRUE,
  );
  $default_mergevars[] = array(
    'name' => 'First Name',
    'order' => 1,
    'tag' => 'FIRSTNAME',
    'req' => FALSE,
    'webid' => 'test',
    'field_type' => 'text',
    'size' => 40,
    'default' => '',
    'public' => TRUE,
  );
  $default_mergevars[] = array(
    'name' => 'Last Name',
    'order' => 2,
    'tag' => 'LASTNAME',
    'req' => FALSE,
    'web_id' => 'test',
    'field_type' => 'text',
    'size' => 40,
    'default' => '',
    'public' => TRUE,
  );
  $lists = array(
    MAILCHIMP_TESTLIST_ANONYMOUS => array(
      'name' => 'Test List A',
      'data' => array(),
      'mergevars' => $default_mergevars,
    ),
    MAILCHIMP_TESTLIST_OPTIONAL => array(
      'name' => 'Test List B',
      'data' => array(),
      'mergevars' => $default_mergevars,
    ),
    MAILCHIMP_TESTLIST_REQUIRED => array(
      'name' => 'Test List C',
      'data' => array(),
      'mergevars' => $default_mergevars,
    ),
  );
  return $lists;
}