feat: remove deprecated booking service alias

This commit is contained in:
Björn Fromme
2026-04-13 12:23:57 +02:00
parent 16cab4b768
commit e179bbe259
2 changed files with 21 additions and 40 deletions
+21 -21
View File
@@ -52,7 +52,7 @@ class BookingServiceBabyTest extends TestCase
$participant->additionalServices = [];
$bookingDto->participants[0] = $participant;
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertEmpty($participant->additionalServices, 'Mandatory services should not be preselected for baby participants');
}
@@ -69,7 +69,7 @@ class BookingServiceBabyTest extends TestCase
$participant->additionalServices = [];
$bookingDto->participants[0] = $participant;
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertEmpty($participant->additionalServices, 'Mandatory services should not be preselected for participants at BABY_MAX_AGE');
}
@@ -91,7 +91,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertNotEmpty($participant->additionalServices, 'Mandatory services should be preselected for non-baby participants');
$this->assertCount(1, $participant->additionalServices);
@@ -115,7 +115,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertNotEmpty($participant->additionalServices, 'Mandatory services should be preselected for adult participants');
$this->assertCount(1, $participant->additionalServices);
@@ -146,7 +146,7 @@ class BookingServiceBabyTest extends TestCase
->with($bookingDto, 1) // Only called for adult
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertEmpty($babyParticipant->additionalServices, 'Baby should not have mandatory services preselected');
$this->assertNotEmpty($adultParticipant->additionalServices, 'Adult should have mandatory services preselected');
@@ -164,7 +164,7 @@ class BookingServiceBabyTest extends TestCase
$participant->additionalServices = [];
$bookingDto->participants[0] = $participant;
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertEmpty($participant->additionalServices, 'Mandatory services should not be preselected for newborn babies');
}
@@ -186,7 +186,7 @@ class BookingServiceBabyTest extends TestCase
$participant->additionalServices = [];
$bookingDto->participants[0] = $participant;
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
// At age 1, participant is a baby and should be skipped
$this->assertEmpty($participant->additionalServices, 'Age should be calculated at travel date, not current date');
@@ -207,7 +207,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertCount(1, $participant->additionalServices);
$this->assertSame('Auto Book Service', $participant->additionalServices[0]->label);
@@ -229,7 +229,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertEmpty($participant->additionalServices);
}
@@ -250,7 +250,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertCount(1, $participant->additionalServices);
$this->assertSame('Mandatory And Auto Book Service', $participant->additionalServices[0]->label);
@@ -270,7 +270,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertNotNull($participant->skiPass);
$this->assertSame('Auto Book Ski Pass', $participant->skiPass?->label);
@@ -291,7 +291,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertNull($participant->skiPass);
}
@@ -311,7 +311,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertNotNull($participant->skiPass);
$this->assertSame('Mandatory And Auto Book Ski Pass', $participant->skiPass?->label);
@@ -331,7 +331,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertCount(1, $participant->board);
$this->assertSame('Auto Book Board', $participant->board[0]->label);
@@ -352,7 +352,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertSame([], $participant->board);
}
@@ -372,7 +372,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertCount(1, $participant->board);
$this->assertSame('Mandatory And Auto Book Board', $participant->board[0]->label);
@@ -393,7 +393,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertCount(1, $participant->rentals);
$this->assertSame('Auto Book Rental', $participant->rentals[0]->label);
@@ -415,7 +415,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertSame([], $participant->rentals);
}
@@ -436,7 +436,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertCount(1, $participant->rentals);
$this->assertSame('Mandatory And Auto Book Rental', $participant->rentals[0]->label);
@@ -456,7 +456,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertSame([], $participant->rentals);
}
@@ -480,7 +480,7 @@ class BookingServiceBabyTest extends TestCase
->method('isParticipantEligible')
->willReturn(true);
$this->bookingService->preselectMandatoryServices($bookingDto);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->assertSame([], $participant->rentals);
}