wip: refactor to cards with individual participant forms
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user