mount('counter:test', ['count' => 0]); // Call action with fragment request $this->call('increment', ['amount' => 5], ['counter-display']); // Should return fragments instead of full HTML $html = $this->getHtml(); $this->assertIsArray($html); $this->assertArrayHasKey('counter-display', $html); $this->assertStringContainsString('5', $html['counter-display']); // State should be updated $this->seeStateKey('count', 5); } public function test_updates_multiple_fragments_simultaneously(): void { // This would require a component with multiple fragments $this->markTestSkipped('Requires component with multiple fragments'); } public function test_falls_back_to_full_render_when_fragments_not_found(): void { $this->mount('counter:test', ['count' => 0]); // Request non-existent fragment $this->call('increment', ['amount' => 5], ['non-existent-fragment']); // Should fall back to full HTML $html = $this->getHtml(); $this->assertIsString($html); $this->assertStringContainsString('5', $html); } }