function CommandLineOrUnsafeMethodTest::providerTestHttpMethod

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php \Drupal\Tests\Core\PageCache\CommandLineOrUnsafeMethodTest::providerTestHttpMethod()
  2. 8.9.x core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php \Drupal\Tests\Core\PageCache\CommandLineOrUnsafeMethodTest::providerTestHttpMethod()
  3. 11.x 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 59

Class

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

Namespace

Drupal\Tests\Core\PageCache

Code

public static 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',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.