function CommandLineOrUnsafeMethodTest::testHttpMethod
Asserts that check() returns DENY for unsafe HTTP methods.
@dataProvider providerTestHttpMethod
@covers ::check
      
    
File
- 
              core/tests/ Drupal/ Tests/ Core/ PageCache/ CommandLineOrUnsafeMethodTest.php, line 43 
Class
- CommandLineOrUnsafeMethodTest
- @coversDefaultClass \Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod[[api-linebreak]] @group PageCache
Namespace
Drupal\Tests\Core\PageCacheCode
public function testHttpMethod($expected_result, $method) : void {
  $this->policy
    ->expects($this->once())
    ->method('isCli')
    ->willReturn(FALSE);
  $request = Request::create('/', $method);
  $actual_result = $this->policy
    ->check($request);
  $this->assertSame($expected_result, $actual_result);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
