b5def13ce38d7d06372b199a09abe2b2ce244d35
[yaffs-website] / vendor / symfony / http-kernel / Tests / Exception / MethodNotAllowedHttpExceptionTest.php
1 <?php
2
3 namespace Symfony\Component\HttpKernel\Tests\Exception;
4
5 use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
6
7 class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
8 {
9     public function testHeadersDefault()
10     {
11         $exception = new MethodNotAllowedHttpException(array('GET', 'PUT'));
12         $this->assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders());
13     }
14
15     /**
16      * @dataProvider headerDataProvider
17      */
18     public function testHeadersSetter($headers)
19     {
20         $exception = new MethodNotAllowedHttpException(array('GET'));
21         $exception->setHeaders($headers);
22         $this->assertSame($headers, $exception->getHeaders());
23     }
24 }