Files
cmsPRO/tests/bootstrap.php
Jacek Pyziak 2e715e803e Fix: testy + bugfix SettingsRepository::allSettings() + migracja phpunit.xml
- SettingsRepository::allSettings() — inicjalizacja $settings = [] przed pętlą
  (bug: false ?? [] zwracało false gdy cache pusty a DB null)
- Stuby wydzielone do tests/stubs/CacheHandler.php + S.php
- phpunit.xml zmigurowany do schematu PHPUnit 10 (coverage → source)
- composer.lock dodany do repozytorium

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:56:00 +01:00

22 lines
701 B
PHP

<?php
// Medoo ORM
require_once __DIR__ . '/../libraries/medoo/medoo.php';
// Stuby — muszą być załadowane PRZED autoloaderem PSR-4,
// żeby nie zostały nadpisane przez prawdziwe klasy
require_once __DIR__ . '/stubs/CacheHandler.php';
require_once __DIR__ . '/stubs/S.php';
// PSR-4 autoloader dla Domain\
// Shared\ jest obsłużona przez stub powyżej — pomijamy w autoloaderze
spl_autoload_register(function (string $class): void {
if (strncmp($class, 'Domain\\', 7) === 0) {
$rel = substr($class, 7);
$file = __DIR__ . '/../autoload/Domain/' . str_replace('\\', '/', $rel) . '.php';
if (file_exists($file)) {
require $file;
}
}
});