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