You are here

public function CommandLineOrUnsafeMethodTest::providerTestHttpMethod in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php \Drupal\Tests\Core\PageCache\CommandLineOrUnsafeMethodTest::providerTestHttpMethod()

Provides test data and expected results for the HTTP method test.

Return value

array Test data and expected results.

File

core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php, line 52

Class

CommandLineOrUnsafeMethodTest
@coversDefaultClass \Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod @group PageCache

Namespace

Drupal\Tests\Core\PageCache

Code

public function providerTestHttpMethod() {
  return [
    [
      NULL,
      'GET',
    ],
    [
      NULL,
      'HEAD',
    ],
    [
      RequestPolicyInterface::DENY,
      'POST',
    ],
    [
      RequestPolicyInterface::DENY,
      'PUT',
    ],
    [
      RequestPolicyInterface::DENY,
      'DELETE',
    ],
    [
      RequestPolicyInterface::DENY,
      'OPTIONS',
    ],
    [
      RequestPolicyInterface::DENY,
      'TRACE',
    ],
    [
      RequestPolicyInterface::DENY,
      'CONNECT',
    ],
  ];
}