forked from fa/breadcrumb-the-shire
22 lines
770 B
PHP
22 lines
770 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace MintyPHP\Tests\Architecture;
|
||
|
|
|
||
|
|
use PHPUnit\Framework\TestCase;
|
||
|
|
|
||
|
|
final class SecurityLoggingTelemetryContractTest extends TestCase
|
||
|
|
{
|
||
|
|
use ProjectFileAssertionSupport;
|
||
|
|
|
||
|
|
public function testFrontendTelemetrySanitizesSecretsAndPiiMarkers(): void
|
||
|
|
{
|
||
|
|
$content = $this->readProjectFile('lib/Service/Audit/FrontendTelemetryIngestService.php');
|
||
|
|
|
||
|
|
self::assertStringContainsString('[REDACTED]', $content);
|
||
|
|
self::assertStringContainsString('[REDACTED_EMAIL]', $content);
|
||
|
|
self::assertStringContainsString('[UUID]', $content);
|
||
|
|
self::assertStringContainsString('[TOKEN]', $content);
|
||
|
|
self::assertStringContainsString('(token|access_token|refresh_token|id_token|authorization|api_key|secret)', $content);
|
||
|
|
}
|
||
|
|
}
|