public function MailchimpListsWebhookTest::testGetWebhook in Mailchimp 8
Same name and namespace in other branches
- 2.x modules/mailchimp_lists/tests/src/Functional/MailchimpListsWebhookTest.php \Drupal\Tests\mailchimp_lists\Functional\MailchimpListsWebhookTest::testGetWebhook()
Tests retrieval of webhooks for a list.
File
- modules/
mailchimp_lists/ src/ Tests/ MailchimpListsWebhookTest.php, line 22
Class
- MailchimpListsWebhookTest
- Tests list webhook functionality.
Namespace
Drupal\Tests\mailchimp_lists\FunctionalCode
public function testGetWebhook() {
$list_id = '57afe96172';
$webhooks = mailchimp_webhook_get($list_id);
$this
->assertEqual($webhooks[0]->list_id, $list_id);
$this
->assertEqual($webhooks[0]->id, '37b9c73a88');
$this
->assertEqual($webhooks[0]->url, 'http://example.org');
$this
->assertEqual($webhooks[0]->events->subscribe, TRUE);
$this
->assertEqual($webhooks[0]->events->unsubscribe, FALSE);
$this
->assertEqual($webhooks[0]->sources->user, TRUE);
$this
->assertEqual($webhooks[0]->sources->api, FALSE);
}