public function ExceptionHandlerTest::testHeaders

File

drupal/core/vendor/symfony/debug/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php, line 55

Class

ExceptionHandlerTest

Namespace

Symfony\Component\Debug\Tests

Code

public function testHeaders() {
  $handler = new ExceptionHandler(false);
  $response = $handler
    ->createResponse(new MethodNotAllowedHttpException(array(
    'POST',
  )));
  $this
    ->assertEquals('405', $response
    ->getStatusCode());
  $this
    ->assertEquals('POST', $response->headers
    ->get('Allow'));
}