public function MailchimpListsTestCase::testGetListSegments in Mailchimp 7.4
Same name and namespace in other branches
- 7.5 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testGetListSegments()
- 7.3 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testGetListSegments()
Tests retrieval of list segments for a list.
File
- modules/
mailchimp_lists/ tests/ mailchimp_lists.test, line 189 - Test class and methods for the Mailchimp Lists module.
Class
- MailchimpListsTestCase
- @file Test class and methods for the Mailchimp Lists module.
Code
public function testGetListSegments() {
$list_id = '57afe96172';
$segments = mailchimp_get_segments($list_id);
$this
->assertEqual($segments[0]->id, 49377);
$this
->assertEqual($segments[0]->name, 'Test Segment One');
$this
->assertEqual($segments[0]->type, 'static');
$this
->assertEqual($segments[0]->list_id, $list_id);
$this
->assertEqual($segments[1]->id, 49378);
$this
->assertEqual($segments[1]->name, 'Test Segment Two');
$this
->assertEqual($segments[1]->type, 'static');
$this
->assertEqual($segments[1]->list_id, $list_id);
}