Files
michaelschiemer/tests/bootstrap.php
Michael Schiemer 5050c7d73a docs: consolidate documentation into organized structure
- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
2025-10-05 11:05:04 +02:00

45 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
// Bootstrap file for PHPStan and tests
require_once __DIR__ . '/../vendor/autoload.php';
use App\Framework\Core\AppBootstrapper;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemHighResolutionClock;
use App\Framework\DI\Container;
use App\Framework\Performance\EnhancedPerformanceCollector;
use App\Framework\Performance\MemoryMonitor;
require_once __DIR__ . '/../src/Framework/Debug/helpers.php';
// Funktion zum Erstellen eines Test-Containers
function createTestContainer(): Container
{
// Konfiguration für Tests
$config = [
'debug' => true,
'async_discovery' => false, // Für Tests deaktiviert
];
// Test-spezifische Anwendung initialisierung (ohne run())
$basePath = dirname(__DIR__);
$clock = new SystemClock();
$highResClock = new SystemHighResolutionClock();
$memoryMonitor = new MemoryMonitor();
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: false);
$bootstrapper = new AppBootstrapper($basePath, $collector, $memoryMonitor);
try {
$app = $bootstrapper->bootstrapWeb();
return $app->getContainer();
} catch (Exception $e) {
echo "Bootstrap failed: " . $e->getMessage() . "\n";
echo $e->getTraceAsString() . "\n";
exit(1);
}
}