initialization

This commit is contained in:
Reindl David (IT-PTR-CEN2-SL10) committed 2026-10-07 01:16:57 +02:00
commit 9ff09693ed
92 files changed
+46209

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
use App\Utils\SecurityConfig;
use PHPUnit\Framework\TestCase;
final class ProductionSecurityConfigTest extends TestCase
{
public function testDevelopmentDefaultsKeepLocalhostCorsAndDebugLogging(): void
{
$this->assertSame('http://localhost:8080', SecurityConfig::resolveCorsOrigin('development'));
$this->assertSame(100, SecurityConfig::resolveRateLimit('development', 100));
$this->assertSame(100, SecurityConfig::resolveLogLevel('debug'));
}
public function testProductionDefaultsRejectWildcardOriginsAndUseRestrictedLogging(): void
{
$this->assertSame('', SecurityConfig::resolveCorsOrigin('production'));
$this->assertSame(120, SecurityConfig::resolveRateLimit('production', 120));
$this->assertSame(300, SecurityConfig::resolveLogLevel('warning'));
}
}