fix: properly handle 'veg' services in booking edit flow

This commit is contained in:
Björn Fromme
2026-04-29 11:59:39 +02:00
parent 287c299c41
commit c0c8ad515c
9 changed files with 89 additions and 4 deletions
@@ -32,6 +32,7 @@ class BookingEditSubmitGuardTest extends TestCase
$workingParticipant = new ParticipantDto();
$workingParticipant->index = 0;
$workingParticipant->additionalServices = [$this->createService(99)];
$workingParticipant->veg = $this->createService(88);
$workingParticipant->transportationOutbound = $this->createService(88);
$workingParticipant->pickup = $this->createPickup(77);
@@ -41,6 +42,7 @@ class BookingEditSubmitGuardTest extends TestCase
$baselineParticipant = new ParticipantDto();
$baselineParticipant->index = 0;
$baselineParticipant->additionalServices = [$this->createService(10)];
$baselineParticipant->veg = $this->createService(11);
$baselineParticipant->transportationOutbound = $this->createService(20);
$baselineParticipant->pickup = $this->createPickup(30);
@@ -58,6 +60,7 @@ class BookingEditSubmitGuardTest extends TestCase
$this->assertTrue($changed);
$this->assertSame([10], array_map(static fn (Service $s) => $s->id, $workingParticipant->additionalServices));
$this->assertSame(11, $workingParticipant->veg?->id);
$this->assertSame(20, $workingParticipant->transportationOutbound?->id);
$this->assertSame(30, $workingParticipant->pickup?->id);
}