shouldReceive('getId') ->andReturn(ComponentId::create('counter', 'demo')); $mockComponent->shouldReceive('getData') ->andReturn(ComponentData::fromArray(['initialValue' => 5])); $mockComponent->shouldReceive('getRenderData') ->andReturn(new ComponentRenderData('counter-template', ['value' => 5])); // Mock LiveComponent Registry $liveComponentRegistry = Mockery::mock(ComponentRegistryInterface::class); $liveComponentRegistry->shouldReceive('isRegistered') ->with('counter') ->andReturn(true); $liveComponentRegistry->shouldReceive('getClassName') ->with('counter') ->andReturn('TestCounterComponent'); $liveComponentRegistry->shouldReceive('resolve') ->andReturn($mockComponent); $liveComponentRegistry->shouldReceive('renderWithWrapper') ->with($mockComponent) ->andReturn('
Done
'; echo "Input HTML:\n$html\n\n"; // Create RenderContext $context = new RenderContext( template: 'test-pipeline', metaData: new MetaData('Pipeline Test'), data: [] ); // Process through pipeline $document = $pipeline->process($context, $html); echo "Pipeline processing completed ✓\n\n"; // Render to HTML $renderer = new HtmlRenderer(); $output = $renderer->render($document); echo "Output HTML:\n$output\n\n"; // Verify if (str_contains($output, 'data-component-id="counter:demo"')) { echo "✓ SUCCESS: Component processed through pipeline!\n"; } else { echo "✗ FAIL: Component not found in output\n"; } if (str_contains($output, '