2079bb3380d20b086d6b597ef5501a4eed0ae424
[yaffs-website] / vendor / symfony / http-kernel / Tests / Exception / TooManyRequestsHttpExceptionTest.php
1 <?php
2
3 namespace Symfony\Component\HttpKernel\Tests\Exception;
4
5 use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
6
7 class TooManyRequestsHttpExceptionTest extends HttpExceptionTest
8 {
9     public function testHeadersDefaultRertyAfter()
10     {
11         $exception = new TooManyRequestsHttpException(10);
12         $this->assertSame(array('Retry-After' => 10), $exception->getHeaders());
13     }
14
15     /**
16      * @dataProvider headerDataProvider
17      */
18     public function testHeadersSetter($headers)
19     {
20         $exception = new TooManyRequestsHttpException(10);
21         $exception->setHeaders($headers);
22         $this->assertSame($headers, $exception->getHeaders());
23     }
24
25     protected function createException()
26     {
27         return new TooManyRequestsHttpException();
28     }
29 }