Cleanup 2 tests for the HttpException classes

This commit is contained in:
ncou 2018-05-14 10:51:37 +02:00 committed by Fabien Potencier
parent fb881194b6
commit 5516b329af
2 changed files with 1 additions and 26 deletions

View File

@ -6,21 +6,6 @@ use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
class UnprocessableEntityHttpExceptionTest extends HttpExceptionTest
{
/**
* Test that setting the headers using the setter function
* is working as expected.
*
* @param array $headers The headers to set
*
* @dataProvider headerDataProvider
*/
public function testHeadersSetter($headers)
{
$exception = new UnprocessableEntityHttpException(10);
$exception->setHeaders($headers);
$this->assertSame($headers, $exception->getHeaders());
}
protected function createException()
{
return new UnprocessableEntityHttpException();

View File

@ -6,17 +6,7 @@ use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
class UnsupportedMediaTypeHttpExceptionTest extends HttpExceptionTest
{
/**
* @dataProvider headerDataProvider
*/
public function testHeadersSetter($headers)
{
$exception = new UnsupportedMediaTypeHttpException(10);
$exception->setHeaders($headers);
$this->assertSame($headers, $exception->getHeaders());
}
protected function createException($headers = array())
protected function createException()
{
return new UnsupportedMediaTypeHttpException();
}