freescout/freescout-dist/vendor/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php

25 lines
714 B
PHP
Raw Normal View History

2023-12-22 19:40:32 +00:00
<?php
namespace Symfony\Component\HttpKernel\Tests\Exception;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
{
public function testHeadersDefault()
{
$exception = new MethodNotAllowedHttpException(array('GET', 'PUT'));
$this->assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders());
}
/**
* @dataProvider headerDataProvider
*/
public function testHeadersSetter($headers)
{
$exception = new MethodNotAllowedHttpException(array('GET'));
$exception->setHeaders($headers);
$this->assertSame($headers, $exception->getHeaders());
}
}