Browse Source

Update doc blocks and shrink public API we offer.

There isn't a need for this class to be public. The helper
method is the public interface.
Mark Story 8 years ago
parent
commit
9fa3d14e76

+ 3 - 2
src/TestSuite/IntegrationTestCase.php

@@ -1053,8 +1053,9 @@ abstract class IntegrationTestCase extends TestCase
     /**
     /**
      * Disable the error handler middleware.
      * Disable the error handler middleware.
      *
      *
-     * By using this function, exceptions are no longer caught by ErrorHandlerMiddleware
-     * and are instead re-thrown by the TestExceptionRenderer. This results in a more clearer error message.
+     * By using this function, exceptions are no longer caught by the ErrorHandlerMiddleware
+     * and are instead re-thrown by the TestExceptionRenderer. This can be helpful
+     * when trying to diagnose/debug unexpected failures in test cases.
      *
      *
      * @return void
      * @return void
      */
      */

+ 5 - 11
src/TestSuite/Stub/TestExceptionRenderer.php

@@ -19,24 +19,18 @@ use Exception;
 /**
 /**
  * Test Exception Renderer.
  * 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);
- * ```
+ * Use this class if you want to re-throw exceptions that would otherwise be
+ * caught by the ErrorHandlerMiddleware. This is useful while debugging or
+ * writing integration test cases.
  *
  *
  * @see \Cake\TestSuite\IntegrationTestCase::disableErrorHandlerMiddleware()
  * @see \Cake\TestSuite\IntegrationTestCase::disableErrorHandlerMiddleware()
+ * @internal
  */
  */
 class TestExceptionRenderer
 class TestExceptionRenderer
 {
 {
 
 
     /**
     /**
-     * Simply rethrows the given exception
+     * Simply rethrow the given exception
      *
      *
      * @param \Exception $exception Exception.
      * @param \Exception $exception Exception.
      * @return void
      * @return void