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