Няма описание

UnprocessableEntityHttpExceptionTest.php 764B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Symfony\Component\HttpKernel\Tests\Exception;
  3. use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
  4. class UnprocessableEntityHttpExceptionTest extends HttpExceptionTest
  5. {
  6. /**
  7. * Test that setting the headers using the setter function
  8. * is working as expected.
  9. *
  10. * @param array $headers The headers to set
  11. *
  12. * @dataProvider headerDataProvider
  13. */
  14. public function testHeadersSetter($headers)
  15. {
  16. $exception = new UnprocessableEntityHttpException(10);
  17. $exception->setHeaders($headers);
  18. $this->assertSame($headers, $exception->getHeaders());
  19. }
  20. protected function createException()
  21. {
  22. return new UnprocessableEntityHttpException();
  23. }
  24. }