feat: split booking between participants and applicant

addresses #869f2q1vu
This commit is contained in:
fromme committed 2026-10-19 09:18:22 +02:00
1 parent 2d49212b08
commit 1ff293f41f
44 files changed
+2024 -316

No files matched your search

+27 -1
View File
@@ -300,7 +300,33 @@ class ParticipantDataPrefillerTest extends TestCase
$this->assertSame('[email protected]', $participant->email);
$this->assertSame('2006-01-15', $participant->dateOfBirth?->format('Y-m-d'));
$this->assertSame('Musterstr. 123', $participant->address?->street);
$this->assertSame('DE', $participant->address?->country);
$this->assertSame(
'D',
$participant->address?->country,
"BusPro's country tokens are not ISO codes: 'DE' matches no choice and leaves the select empty"
);
CarbonImmutable::setTestNow();
}
public function testFillDummyApplicantSetsACompleteAdult(): void
{
CarbonImmutable::setTestNow(CarbonImmutable::create(2026, 1, 15, 14, 30));
$applicant = new ParticipantDto();
$this->service()->fillDummyApplicant($applicant);
$this->assertSame('Probeelternteil', $applicant->firstName);
$this->assertSame('Elternteil 14:30', $applicant->lastName);
$this->assertSame('[email protected]', $applicant->email);
$this->assertSame('0171/222222', $applicant->mobile);
$this->assertSame('Probeweg 7', $applicant->address?->street);
// The applicant block requires these, unlike a participant.
$this->assertSame('W', $applicant->gender);
$this->assertSame('D', $applicant->nationality);
$this->assertSame('D', $applicant->address?->country);
$this->assertGreaterThanOrEqual(18, $applicant->getAge());
CarbonImmutable::setTestNow();
}