diff --git a/src/Laravel/Tests/NullableBelongsToTest.php b/src/Laravel/Tests/NullableBelongsToTest.php index d90bea255d..f35e51d2de 100644 --- a/src/Laravel/Tests/NullableBelongsToTest.php +++ b/src/Laravel/Tests/NullableBelongsToTest.php @@ -69,8 +69,7 @@ public function testOmittingBelongsToKeepsIt(): void public function testPatchWithExplicitNullClearsMorphTo(): void { - $slot = TimeSlotFactory::new()->create(); - $note = NullableMorphNoteFactory::new()->for($slot, 'noteable')->create(); + $note = NullableMorphNoteFactory::new()->for(TimeSlotFactory::new(), 'noteable')->create(); $this->assertNotNull(NullableMorphNote::query()->sole()->noteable_id); // @phpstan-ignore-line $response = $this->patchJson('/api/nullable_morph_notes/'.$note->id, [ // @phpstan-ignore-line