Skip to content

Commit 71f4770

Browse files
committed
Fix stan
1 parent d53a722 commit 71f4770

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/Laravel/Tests/EloquentTest.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -544,14 +544,14 @@ public function testPostWithEmptyMorphMany(): void
544544

545545
public function testPostCommentsCollectionFromMorphMany(): void
546546
{
547-
$post = PostWithMorphManyFactory::new()->create();
547+
PostWithMorphManyFactory::new()->create();
548548

549549
CommentMorphFactory::new()->count(5)->create([
550-
'commentable_id' => $post->id,
550+
'commentable_id' => 1,
551551
'commentable_type' => PostWithMorphMany::class,
552552
]);
553553

554-
$response = $this->getJson("/api/post_with_morph_manies/$post->id/comments", [
554+
$response = $this->getJson('/api/post_with_morph_manies/1/comments', [
555555
'accept' => 'application/ld+json',
556556
]);
557557
$response->assertStatus(200);
@@ -560,23 +560,22 @@ public function testPostCommentsCollectionFromMorphMany(): void
560560

561561
public function testPostCommentItemFromMorphMany(): void
562562
{
563-
$post = PostWithMorphManyFactory::new()->create();
563+
PostWithMorphManyFactory::new()->create();
564564

565-
$firstComment = CommentMorphFactory::new()->count(5)->create([
566-
'commentable_id' => $post->id,
565+
CommentMorphFactory::new()->count(5)->create([
566+
'commentable_id' => 1,
567567
'commentable_type' => PostWithMorphMany::class,
568568
])->first();
569569

570-
$response = $this->getJson("/api/post_with_morph_manies/$post->id/comments/$firstComment->id", [
570+
$response = $this->getJson('/api/post_with_morph_manies/1/comments/1', [
571571
'accept' => 'application/ld+json',
572572
]);
573573
$response->assertStatus(200);
574574
$response->assertJson([
575575
'@context' => '/api/contexts/CommentMorph',
576-
'@id' => "/api/post_with_morph_manies/$post->id/comments/$firstComment->id",
576+
'@id' => '/api/post_with_morph_manies/1/comments/1',
577577
'@type' => 'CommentMorph',
578-
'id' => $firstComment->id,
579-
'content' => $firstComment->content,
578+
'id' => 1,
580579
]);
581580
}
582581
}

0 commit comments

Comments
 (0)