'https://lorem.ipsum/schedule.xml']); $schedule->save(); $scheduleShift = new ScheduleShift(['shift_id' => 1, 'guid' => 'a']); $scheduleShift->schedule()->associate($schedule); $scheduleShift->save(); /** @var ScheduleShift $scheduleShift */ $scheduleShift = (new ScheduleShift())->find(1); $this->assertInstanceOf(BelongsTo::class, $scheduleShift->schedule()); $this->assertEquals($schedule->id, $scheduleShift->schedule->id); } }