public function MailchimpListsTest::testGetMergevars in Mailchimp 8
Same name and namespace in other branches
- 2.x modules/mailchimp_lists/tests/src/Functional/MailchimpListsTest.php \Drupal\Tests\mailchimp_lists\Functional\MailchimpListsTest::testGetMergevars()
Tests retrieval of mergevars for a set of lists.
File
- modules/
mailchimp_lists/ src/ Tests/ MailchimpListsTest.php, line 54
Class
- MailchimpListsTest
- Tests core lists functionality.
Namespace
Drupal\Tests\mailchimp_lists\FunctionalCode
public function testGetMergevars() {
$list_ids = [
'57afe96172',
];
$mergevars = mailchimp_get_mergevars($list_ids);
$this
->assertEqual(count($mergevars[$list_ids[0]]), 3, 'Tested correct mergevar count on retrieval.');
$this
->assertEqual($mergevars[$list_ids[0]][0]->tag, 'EMAIL');
$this
->assertEqual($mergevars[$list_ids[0]][1]->tag, 'FNAME');
$this
->assertEqual($mergevars[$list_ids[0]][2]->tag, 'LNAME');
}