Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / http-kernel / Tests / Exception / TooManyRequestsHttpExceptionTest.php
diff --git a/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php b/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
new file mode 100644 (file)
index 0000000..2079bb3
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+namespace Symfony\Component\HttpKernel\Tests\Exception;
+
+use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
+
+class TooManyRequestsHttpExceptionTest extends HttpExceptionTest
+{
+    public function testHeadersDefaultRertyAfter()
+    {
+        $exception = new TooManyRequestsHttpException(10);
+        $this->assertSame(array('Retry-After' => 10), $exception->getHeaders());
+    }
+
+    /**
+     * @dataProvider headerDataProvider
+     */
+    public function testHeadersSetter($headers)
+    {
+        $exception = new TooManyRequestsHttpException(10);
+        $exception->setHeaders($headers);
+        $this->assertSame($headers, $exception->getHeaders());
+    }
+
+    protected function createException()
+    {
+        return new TooManyRequestsHttpException();
+    }
+}