diff --git a/src/TestSuite/Stub/TestExceptionRenderer.php b/src/TestSuite/Stub/TestExceptionRenderer.php index eac45c906a8..c4aff4b6ce4 100644 --- a/src/TestSuite/Stub/TestExceptionRenderer.php +++ b/src/TestSuite/Stub/TestExceptionRenderer.php @@ -18,12 +18,25 @@ /** * Test Exception Renderer. + * + * You can use this class if you want to re-throw exceptions that else would + * be caught by the ErrorHandlerMiddleware. + * This is useful while debugging or writitng integration test cases. + * + * ``` + * use Cake\Core\Configure; + * use Cake\TestSuite\Stub\TestExceptionRenderer; + * + * Configure::write('Error.exceptionRenderer', TestExceptionRenderer::class); + * ``` + * + * @see \Cake\TestSuite\IntegrationTestCase::disableErrorHandlerMiddleware() */ class TestExceptionRenderer { /** - * Constructor + * Simply rethrows the given exception * * @param \Exception $exception Exception. * @return void diff --git a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php index 73c5b4a0fb0..3ec8369e589 100644 --- a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php +++ b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php @@ -923,7 +923,7 @@ public function testAssertFileNoFile() } /** - * undocumented function + * Test disabling the error handler middleware. * * @expectedException \Cake\Routing\Exception\MissingRouteException * @expectedExceptionMessage A route matching "/foo" could not be found.