Hello World

This is a simple test.

HTML; echo "Input HTML:\n$html\n\n"; // Create minimal RenderContext $context = new RenderContext( template: 'test-simple', metaData: new MetaData('Simple Test'), data: [], processingMode: ProcessingMode::MINIMAL // Minimal processing ); try { // Render (should just parse and return the HTML unchanged) $output = $templateProcessor->render($context, $html); echo "Output HTML:\n$output\n\n"; // Verify basic structure is preserved $checks = [ 'title preserved' => str_contains($output, 'Test Page'), 'h1 preserved' => str_contains($output, '

Hello World

'), 'paragraph preserved' => str_contains($output, '

This is a simple test.

'), 'html structure' => str_contains($output, '') && str_contains($output, ''), 'body structure' => str_contains($output, '') && str_contains($output, '') ]; echo "Verification:\n"; foreach ($checks as $check => $passed) { echo ($passed ? '✓' : '✗') . " $check\n"; } $allPassed = array_reduce($checks, fn($carry, $item) => $carry && $item, true); echo "\n" . ($allPassed ? '✅ TEMPLATE PROCESSOR AST INTEGRATION WORKING!' : '❌ SOME CHECKS FAILED') . "\n"; exit($allPassed ? 0 : 1); } catch (\Throwable $e) { echo "❌ ERROR: {$e->getMessage()}\n"; echo "Stack trace:\n{$e->getTraceAsString()}\n"; exit(1); }