You are here

public function MailchimpListsTestCase::testCreateSegment in Mailchimp 7.3

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testCreateSegment()
  2. 7.4 modules/mailchimp_lists/tests/mailchimp_lists.test \MailchimpListsTestCase::testCreateSegment()

Tests creation of a segmenet for a list.

File

modules/mailchimp_lists/tests/mailchimp_lists.test, line 228
Test class and methods for the Mailchimp Lists module.

Class

MailchimpListsTestCase
@file Test class and methods for the Mailchimp Lists module.

Code

public function testCreateSegment() {
  $list_id = MAILCHIMP_LISTS_TEST_LIST_A;
  $name = 'New List Segment Test';
  $type = 'static';
  $segment_id = mailchimp_segment_create($list_id, $name, $type);
  $this
    ->assertFalse(empty($segment_id), 'Tested new list segment has valid ID.');
}