Skip to content

Commit a9e4587

Browse files
committed
Ensure debug is false in tests to avoid accidentally masking exception responses wrongly
1 parent 69f27ed commit a9e4587

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/TestCase.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ public function setUp(): void
1616
{
1717
parent::setUp();
1818

19+
// Why, you ask? If we don't force this to false it is possible for certain exceptions
20+
// to show their error message properly in the integration test output, but not actually
21+
// be setup correctly to display thier message in production.
22+
//
23+
// If we expect a message in a test, and it isn't showing up (rather, showing the generic
24+
// "an error occurred" message), we can probably assume that the exception isn't one that
25+
// is recognized as being user viewable.
26+
config()->set('app.debug', false);
27+
1928
$this->setKnownUuidFactory();
2029
}
2130

0 commit comments

Comments
 (0)