diff --git a/src/Taxonomies/TermQueryBuilder.php b/src/Taxonomies/TermQueryBuilder.php index f579b5b0..8ab82d3f 100644 --- a/src/Taxonomies/TermQueryBuilder.php +++ b/src/Taxonomies/TermQueryBuilder.php @@ -250,6 +250,7 @@ private function applyCollectionAndTaxonomyWheres() ->pluck('slug'); } + dump("using map"); return TermModel::where('taxonomy', $taxonomy) ->select('slug') ->get() diff --git a/tests/Data/Taxonomies/TermQueryBuilderTest.php b/tests/Data/Taxonomies/TermQueryBuilderTest.php index 46388561..c64aa751 100644 --- a/tests/Data/Taxonomies/TermQueryBuilderTest.php +++ b/tests/Data/Taxonomies/TermQueryBuilderTest.php @@ -207,6 +207,16 @@ public function terms_are_found_using_where_column() $this->assertEquals(['a', 'b', 'e'], $terms->map->slug()->all()); } + #[Test] + public function it_filters_usage_in_collections_using_file_based_entries() + { + config()->set('statamic.eloquent-driver.entries.driver', 'file'); + $this->it_filters_usage_in_collections(); + + // revert config to original + config()->set('statamic.eloquent-driver.entries.driver', 'eloquent'); + } + #[Test] public function it_filters_usage_in_collections() {