You are here

public function WebhookPostTest::testGetMethodBlocked in Zoom API 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/WebhookPostTest.php \Drupal\Tests\zoomapi\Functional\WebhookPostTest::testGetMethodBlocked()

GET method should return a 405.

File

tests/src/Functional/WebhookPostTest.php, line 54

Class

WebhookPostTest
Webhook post tests.

Namespace

Drupal\Tests\zoomapi\Functional

Code

public function testGetMethodBlocked() {
  $url = Url::fromRoute('zoomapi.webhooks')
    ->setAbsolute()
    ->toString();
  $res = $this
    ->getHttpClient()
    ->get($url, [
    'http_errors' => FALSE,
  ]);
  $this
    ->assertEquals($res
    ->getStatusCode(), 405, 'GET method not allowed.');
}