You are here

public function WebhooksTest::testEventSend in Webhooks 8

Test outgoing webhook.

File

tests/src/Functional/WebhooksTest.php, line 190

Class

WebhooksTest
Test description.

Namespace

Drupal\Tests\webhooks\Functional

Code

public function testEventSend() {

  /** @var \Drupal\webhooks\Entity\WebhookConfig $webhook_config */
  $webhook_config = WebhookConfig::load(self::WEBHOOK_ID_OUTGOING);
  $webhook = new Webhook($this->payload);
  $this->webhookService
    ->send($webhook_config, $webhook);
  $this
    ->assertEqual($this->state
    ->get('onWebhookSend'), TRUE);
}