public function MailchimpListsWebhookTest::testGetWebhook in Mailchimp 2.x
Same name and namespace in other branches
- 8 modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php \Drupal\Tests\mailchimp_lists\Functional\MailchimpListsWebhookTest::testGetWebhook()
Tests retrieval of webhooks for a list.
File
- modules/
mailchimp_lists/ tests/ src/ Functional/ 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
->assertSame($webhooks[0]->list_id, $list_id);
$this
->assertSame($webhooks[0]->id, '37b9c73a88');
$this
->assertSame($webhooks[0]->url, 'http://example.org');
$this
->assertTrue($webhooks[0]->events->subscribe);
$this
->assertFalse($webhooks[0]->events->unsubscribe);
$this
->assertTrue($webhooks[0]->sources->user);
$this
->assertFalse($webhooks[0]->sources->api);
}