Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / http-kernel / Tests / Exception / ServiceUnavailableHttpExceptionTest.php
1 <?php
2
3 namespace Symfony\Component\HttpKernel\Tests\Exception;
4
5 use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
6
7 class ServiceUnavailableHttpExceptionTest extends HttpExceptionTest
8 {
9     public function testHeadersDefaultRetryAfter()
10     {
11         $exception = new ServiceUnavailableHttpException(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 ServiceUnavailableHttpException(10);
21         $exception->setHeaders($headers);
22         $this->assertSame($headers, $exception->getHeaders());
23     }
24
25     protected function createException()
26     {
27         return new ServiceUnavailableHttpException();
28     }
29 }