Skip to content

Commit 044ae1a

Browse files
authored
test(laravel): use createOne() for the for() relation (#8718)
create() returns Collection|Model, which PHPStan rejects as a for() argument.
1 parent a87bfad commit 044ae1a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/Laravel/Tests/NullableBelongsToTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function testOmittingBelongsToKeepsIt(): void
6969

7070
public function testPatchWithExplicitNullClearsMorphTo(): void
7171
{
72-
$slot = TimeSlotFactory::new()->create();
72+
$slot = TimeSlotFactory::new()->createOne();
7373
$note = NullableMorphNoteFactory::new()->for($slot, 'noteable')->create();
7474
$this->assertNotNull(NullableMorphNote::query()->sole()->noteable_id); // @phpstan-ignore-line
7575

0 commit comments

Comments
 (0)