first commit

This commit is contained in:
julien
2026-03-20 22:13:41 +01:00
commit 41f8b3afb4
323 changed files with 27222 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace Tests\Architecture;
use Tests\Architecture\Support\ArchitectureTestCase;
final class HttpRuntimeBoundaryTest extends ArchitectureTestCase
{
public function testKernelHttpApplicationContainsOnlyTransverseHttpContracts(): void
{
$path = $this->projectPath('src/Kernel/Http/Application');
self::assertDirectoryExists($path);
$entries = array_values(array_filter(scandir($path) ?: [], static fn (string $entry): bool => !in_array($entry, ['.', '..'], true)));
sort($entries);
self::assertSame([
'Flash',
'Session',
], $entries, 'Kernel/Http/Application should only expose transverse HTTP contracts.');
}
public function testKernelRuntimeHttpContainsOnlyApprovedAssemblyClasses(): void
{
$path = $this->projectPath('src/Kernel/Runtime/Http');
self::assertDirectoryExists($path);
$entries = array_values(array_filter(scandir($path) ?: [], static fn (string $entry): bool => !in_array($entry, ['.', '..'], true)));
sort($entries);
self::assertSame([
'DefaultErrorHandler.php',
'ErrorHandlerConfigurator.php',
'HttpApplicationFactory.php',
'MiddlewareRegistrar.php',
], $entries, 'Kernel/Runtime/Http should contain only the approved HTTP runtime assembly classes.');
}
}