public function MailchimpListsTestCase::testMultiListRetrieval in Mailchimp 7.3
Same name and namespace in other branches
- 7.5 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testMultiListRetrieval()
- 7.4 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testMultiListRetrieval()
Tests retrieval of a specific set of lists.
File
- modules/
mailchimp_lists/ tests/ mailchimp_lists.test, line 77 - Test class and methods for the Mailchimp Lists module.
Class
- MailchimpListsTestCase
- @file Test class and methods for the Mailchimp Lists module.
Code
public function testMultiListRetrieval() {
$list_ids = array(
MAILCHIMP_LISTS_TEST_LIST_A,
MAILCHIMP_LISTS_TEST_LIST_B,
);
$lists = mailchimp_get_lists($list_ids);
$this
->assertEqual(count($lists), 2, 'Tested correct list count on retrieval.');
foreach ($list_ids as $list_id) {
$this
->assertTrue(isset($lists[$list_id]), 'Tested valid list ID retrieved: ' . $list_id);
unset($lists[$list_id]);
}
$this
->assertEqual(count($lists), 0, 'Tested all lists retrieved.');
}