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(