minor #27256 Cleanup 2 tests for the HttpException classes (ncou)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #27256).
Discussion
----------
Cleanup 2 tests for the HttpException classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27238
| License | MIT
| Doc PR | -
See discussion in linked issue.
Commits
-------
5516b329af
Cleanup 2 tests for the HttpException classes
This commit is contained in:
commit
4c38b4dfa6
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user