3 namespace Symfony\Component\HttpKernel\Tests\Exception;
5 use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
7 class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
9 public function testHeadersDefault()
11 $exception = new MethodNotAllowedHttpException(array('GET', 'PUT'));
12 $this->assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders());
16 * @dataProvider headerDataProvider
18 public function testHeadersSetter($headers)
20 $exception = new MethodNotAllowedHttpException(array('GET'));
21 $exception->setHeaders($headers);
22 $this->assertSame($headers, $exception->getHeaders());