This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/vendor/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
2018-11-23 12:29:20 +00:00

29 lines
796 B
PHP

<?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();
}
}