disposition(pickup: 4711)); $this->assertSame([ 'teamerName' => 'Kim Muster', 'jobProfileName' => 'Reiseleitung', 'jobProfileCategory' => JobProfile::CATEGORY_GUIDE, 'destinationProduct' => 'Davos Klosters - Schwendi', 'hotel' => 'Schwendi', 'hotelCode' => 'DKI', 'dateFrom' => '2026-01-10', 'dateTo' => '2026-01-17', 'escortPickup' => ['busProId' => 4711, 'city' => 'Stuttgart', 'street' => 'Busbahnhof', 'time' => '21:30'], // the escort leaves the evening before arrival 'escortPickupDate' => '2026-01-09', ], $context); } public function testDispositionWithoutEscortHasNoPickup(): void { $context = DispositionContext::build($this->disposition(pickup: 0)); $this->assertNull($context['escortPickup']); $this->assertNull($context['escortPickupDate']); } private function disposition(int $pickup): Disposition { $destination = (new Destination()) ->setProduct('Davos Klosters - Schwendi') ->setHotel('Schwendi') ->setHotelCode('DKI') ->setDateFrom(new \DateTimeImmutable('2026-01-10')) ->setDateTo(new \DateTimeImmutable('2026-01-17')) ->setPickups([ ['busProId' => 4711, 'city' => 'Stuttgart', 'street' => 'Busbahnhof', 'time' => '21:30'], ['busProId' => 4712, 'city' => 'Ulm', 'street' => 'ZOB', 'time' => '22:45'], ]) ; $assignment = (new Assignment()) ->setDestination($destination) ->setJobProfile((new JobProfile())->setName('Reiseleitung')->setCategory(JobProfile::CATEGORY_GUIDE)) ->setPickup($pickup) ; $teamer = (new Teamer())->setFirstName('Kim')->setLastName('Muster'); return new Disposition(new Application($assignment, $teamer)); } }