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.'); } }