Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / http-kernel / Tests / Exception / UnauthorizedHttpExceptionTest.php
diff --git a/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
new file mode 100644 (file)
index 0000000..37a0028
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Symfony\Component\HttpKernel\Tests\Exception;
+
+use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
+
+class UnauthorizedHttpExceptionTest extends HttpExceptionTest
+{
+    public function testHeadersDefault()
+    {
+        $exception = new UnauthorizedHttpException('Challenge');
+        $this->assertSame(array('WWW-Authenticate' => 'Challenge'), $exception->getHeaders());
+    }
+
+    /**
+     * @dataProvider headerDataProvider
+     */
+    public function testHeadersSetter($headers)
+    {
+        $exception = new UnauthorizedHttpException('Challenge');
+        $exception->setHeaders($headers);
+        $this->assertSame($headers, $exception->getHeaders());
+    }
+}