From a9e45871255fb9930596afcaa213277ada03de43 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 10 Oct 2020 16:51:44 -0700 Subject: [PATCH] Ensure debug is false in tests to avoid accidentally masking exception responses wrongly --- tests/TestCase.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/TestCase.php b/tests/TestCase.php index 830ba4c0f..1908ac15e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -16,6 +16,15 @@ abstract class TestCase extends BaseTestCase { parent::setUp(); + // Why, you ask? If we don't force this to false it is possible for certain exceptions + // to show their error message properly in the integration test output, but not actually + // be setup correctly to display thier message in production. + // + // If we expect a message in a test, and it isn't showing up (rather, showing the generic + // "an error occurred" message), we can probably assume that the exception isn't one that + // is recognized as being user viewable. + config()->set('app.debug', false); + $this->setKnownUuidFactory(); }