protected function MailchimpListsBasicTestCase::testLists in Mailchimp 7.2
Return an array of lists keyed by machine name to use in testing.
Return value
array
2 calls to MailchimpListsBasicTestCase::testLists()
- MailchimpListsBasicTestCase::setUp in modules/
mailchimp_lists/ tests/ mailchimp_lists.test - Pre-test setup function.
- MailchimpListsBasicTestCase::testMailchimpListCRUD in modules/
mailchimp_lists/ tests/ mailchimp_lists.test - Tests Create, Read, Update, and Delete entity operations.
File
- modules/
mailchimp_lists/ tests/ mailchimp_lists.test, line 414 - Test class and methods for the Mailchimp Lists module.
Class
- MailchimpListsBasicTestCase
- @file Test class and methods for the Mailchimp Lists module.
Code
protected function testLists() {
$lists = array();
$list = mailchimp_list_create();
$list->label = 'Anonymous Test List';
$list->name = 'anonymous_test_list';
$list->description = 'Anonymous list description';
$list->mc_list_id = MAILCHIMP_TESTLIST_ANONYMOUS;
$list->settings = array(
'roles' => array(
DRUPAL_AUTHENTICATED_RID => DRUPAL_AUTHENTICATED_RID,
DRUPAL_ANONYMOUS_RID => DRUPAL_ANONYMOUS_RID,
),
'mergefields' => array(
'EMAIL',
),
'mergefields_display' => array(
'EMAIL' => TRUE,
),
'cron' => FALSE,
'doublein' => FALSE,
'include_interest_groups' => FALSE,
'required' => FALSE,
'allow_anonymous' => TRUE,
);
$lists[$list->name] = $list;
$list = mailchimp_list_create();
$list->label = 'Optional Test List';
$list->name = 'optional_test_list';
$list->description = 'Optional list description';
$list->mc_list_id = MAILCHIMP_TESTLIST_OPTIONAL;
$list->settings = array(
'roles' => array(
DRUPAL_AUTHENTICATED_RID => DRUPAL_AUTHENTICATED_RID,
),
'mergefields' => array(
'',
),
'cron' => FALSE,
'show_account_form' => TRUE,
'doublein' => FALSE,
'include_interest_groups' => FALSE,
'required' => FALSE,
'allow_anonymous' => FALSE,
);
$lists[$list->name] = $list;
$list = mailchimp_list_create();
$list->label = 'Required Test List';
$list->name = 'required_test_list';
$list->description = 'Required list description';
$list->mc_list_id = MAILCHIMP_TESTLIST_REQUIRED;
$list->settings = array(
'roles' => array(
DRUPAL_AUTHENTICATED_RID => DRUPAL_AUTHENTICATED_RID,
),
'mergefields' => array(),
'cron' => FALSE,
'doublein' => FALSE,
'include_interest_groups' => FALSE,
'required' => TRUE,
'allow_anonymous' => FALSE,
);
$lists[$list->name] = $list;
return $lists;
}