TestErrorHandler.php 645 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. declare(strict_types=1);
  3. namespace TestApp\Error;
  4. use Cake\Error\ErrorHandler;
  5. /**
  6. * Testing stub.
  7. */
  8. class TestErrorHandler extends ErrorHandler
  9. {
  10. /**
  11. * Access the response used.
  12. *
  13. * @var \Cake\Http\Response
  14. */
  15. public $response;
  16. /**
  17. * Stub output clearing in tests.
  18. *
  19. * @return void
  20. */
  21. protected function _clearOutput(): void
  22. {
  23. // noop
  24. }
  25. /**
  26. * Stub sending responses
  27. *
  28. * @param \Cake\Http\Response $response
  29. * @return void
  30. */
  31. protected function _sendResponse($response): void
  32. {
  33. $this->response = $response;
  34. }
  35. }