From 76a0b4771368ceabc06e5a7a286c5eb841832540 Mon Sep 17 00:00:00 2001 From: mortazavi Date: Mon, 26 Jun 2023 21:58:24 +0330 Subject: [PATCH] fix ResourceCollectionQueryTest::collection test; --- tests/Feature/Http/Resources/ResourceCollectionQueryTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Feature/Http/Resources/ResourceCollectionQueryTest.php b/tests/Feature/Http/Resources/ResourceCollectionQueryTest.php index 064ebdc..86a3baa 100644 --- a/tests/Feature/Http/Resources/ResourceCollectionQueryTest.php +++ b/tests/Feature/Http/Resources/ResourceCollectionQueryTest.php @@ -27,7 +27,9 @@ protected function setUp(): void { * @return void */ public function collection(): void { - $resource = PostCollection::make( $this->posts )->withAllCommentsQuery(); + $resource = PostCollection::make( $this->posts ) + ->skipRelationsForModel( [ Post::class => 'comments' ] ) + ->withAllCommentsQuery(); $comments = $this->posts->map( fn( Post $post ) => $post->comments )->flatten(); self::assertEquals(