wip: refactor to cards with individual participant forms

This commit is contained in:
Björn Fromme
2026-03-16 11:59:10 +01:00
parent 33e1aea80c
commit de8cbf6178
22 changed files with 866 additions and 212 deletions
@@ -32,16 +32,37 @@ class ParticipantInsuranceFieldHandlerTest extends TestCase
{
$dependencies = $this->handler->getDependencies();
$this->assertEquals(['dateOfBirth'], $dependencies);
// Insurance handler depends on all price-affecting fields to ensure accurate reassignment
$expectedDependencies = [
'dateOfBirth',
'skiPass',
'rentals',
'courses',
'additionalServices',
'board',
'transportationOutbound',
'transportationInbound',
'pickup',
'parking',
];
$this->assertEquals($expectedDependencies, $dependencies);
}
public function testShouldProcessAlwaysReturnsTrue(): void
public function testShouldProcessReturnsTrueInCreateMode(): void
{
$result = $this->handler->shouldProcess([], 0);
$result = $this->handler->shouldProcess([], BookingDto::MODE_CREATE, 0);
$this->assertTrue($result);
}
public function testShouldProcessReturnsFalseInEditMode(): void
{
$result = $this->handler->shouldProcess([], BookingDto::MODE_EDIT, 0);
$this->assertFalse($result, 'Insurance handler should not process in edit mode as API does not return insurance data');
}
public function testProcessFieldSetsInsuranceToNullWhenNoParticipant(): void
{
$bookingDto = $this->createMockBookingDto();