diff --git a/.gitignore b/.gitignore index b1e6ec0e..503ac61b 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,6 @@ config/files/ # Doku lebt im Obsidian-Vault (iCloud), per Devcontainer nach docs/ eingebunden # — nicht im Repository (Audit Q-05, entschieden 05.10.2026). /docs/ + +# Produktions-Logs zur Auswertung (können personenbezogene Daten enthalten) +/dev/**/*.log diff --git a/phpunit.xml b/phpunit.xml index 1ca5f122..21cdf420 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -34,6 +34,13 @@ + + + + + + + diff --git a/tests/Feature/Monitoring/ErrorReportingTest.php b/tests/Feature/Monitoring/ErrorReportingTest.php index 3a9c87e1..67f546c3 100644 --- a/tests/Feature/Monitoring/ErrorReportingTest.php +++ b/tests/Feature/Monitoring/ErrorReportingTest.php @@ -5,6 +5,7 @@ use App\Support\Monitoring\ErrorReportScrubber; use Illuminate\Support\Facades\Route; use Sentry\Event; use Sentry\ExceptionDataBag; +use Sentry\SentrySdk; use Tests\Support\FakeGlitchTip; /** @@ -75,3 +76,11 @@ test('messages and exception values lose e-mail addresses', function () { ->and($scrubbed?->getExceptions()[0]->getValue())->toBe('Duplicate entry \'[email]\'') ->and($scrubbed?->getUser())->toBeNull(); }); + +test('the test suite never reports to the real glitchtip', function () { + // Ohne diese Absicherung landeten absichtlich provozierte Fehler + // („Queue weg“, „Datenbank nicht erreichbar“) als Issues in GlitchTip. + expect(config('sentry.dsn'))->toBeEmpty() + ->and(config('monitoring.browser.dsn'))->toBeEmpty() + ->and(SentrySdk::getCurrentHub()->getClient()?->getOptions()->getDsn())->toBeNull(); +});