Açıklama Yok

MethodNotAllowedHttpExceptionTest.php 714B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Symfony\Component\HttpKernel\Tests\Exception;
  3. use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
  4. class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
  5. {
  6. public function testHeadersDefault()
  7. {
  8. $exception = new MethodNotAllowedHttpException(array('GET', 'PUT'));
  9. $this->assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders());
  10. }
  11. /**
  12. * @dataProvider headerDataProvider
  13. */
  14. public function testHeadersSetter($headers)
  15. {
  16. $exception = new MethodNotAllowedHttpException(array('GET'));
  17. $exception->setHeaders($headers);
  18. $this->assertSame($headers, $exception->getHeaders());
  19. }
  20. }