You are here

protected function MolliePaymentOffsiteFormTest::helperCallOnNotifyWebhook in Commerce Mollie 8

Calls onNotify() a.k.a. Webhook.

5 calls to MolliePaymentOffsiteFormTest::helperCallOnNotifyWebhook()
MolliePaymentOffsiteFormTest::testMolliePaymentStatusCanceled in tests/src/Functional/MolliePaymentOffsiteFormTest.php
Tests MOLLIE payment with CANCELED status.
MolliePaymentOffsiteFormTest::testMolliePaymentStatusExpired in tests/src/Functional/MolliePaymentOffsiteFormTest.php
Tests MOLLIE payment with EXPIRED status.
MolliePaymentOffsiteFormTest::testMolliePaymentStatusFailed in tests/src/Functional/MolliePaymentOffsiteFormTest.php
Tests MOLLIE payment with FAILED status.
MolliePaymentOffsiteFormTest::testMolliePaymentStatusOpen in tests/src/Functional/MolliePaymentOffsiteFormTest.php
Tests MOLLIE payment with OPEN status.
MolliePaymentOffsiteFormTest::testMolliePaymentStatusPaid in tests/src/Functional/MolliePaymentOffsiteFormTest.php
Tests MOLLIE payment with PAID status.

File

tests/src/Functional/MolliePaymentOffsiteFormTest.php, line 378

Class

MolliePaymentOffsiteFormTest
Tests the checkout form that initializes a payment.

Namespace

Drupal\Tests\commerce_mollie\Functional

Code

protected function helperCallOnNotifyWebhook() {
  $notify_url = $this
    ->getAbsoluteUrl('/payment/notify/mollie_test_gateway');
  $post_data = [
    'id' => 'test_id',
  ];
  $session = $this
    ->getSession();
  $session
    ->setCookie('SIMPLETEST_USER_AGENT', drupal_generate_test_ua($this->databasePrefix));
  $session
    ->getDriver()
    ->getClient()
    ->request('POST', $notify_url, $post_data);
}