Skip to content

Commit

Permalink
Add missing docs and improve TestExceptionRenderer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hoffmann committed Jun 19, 2017
1 parent 4f6591a commit 84f3196
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/TestSuite/Stub/TestExceptionRenderer.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/TestSuite/IntegrationTestCaseTest.php
Expand Up @@ -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.
Expand Down

0 comments on commit 84f3196

Please sign in to comment.