public function testGettingVehicleWhenVehicleNotSetOnLap() { // Init participant $participant = Participant::createInstance(); // Set vehicle $participant->setVehicle($vehicle = new Vehicle()); // Normal lap without vehicle on lap itself $lap = new Lap(); $lap->setParticipant($participant); // Validate vehicle $this->assertSame($vehicle, $lap->getVehicle()); }