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