77
88namespace Magento \AdvancedSearch \Model ;
99
10+ use Magento \Catalog \Test \Fixture \Product as ProductFixture ;
1011use Magento \Search \Model \Query ;
12+ use Magento \Store \Model \ScopeInterface ;
13+ use Magento \TestFramework \Fixture \Config as FixtureConfig ;
14+ use Magento \TestFramework \Fixture \DataFixture ;
15+ use Magento \TestFramework \Fixture \DbIsolation ;
1116use Magento \TestFramework \Helper \Bootstrap ;
1217use PHPUnit \Framework \TestCase ;
1318
@@ -24,14 +29,18 @@ protected function setUp(): void
2429 ->create (SuggestedQueries::class);
2530 }
2631
27- /**
28- * @magentoDbIsolation disabled
29- * @magentoDataFixture Magento\Catalog\Test\Fixture\Product with:{"name":"fresh arugula salad"}
30- * @magentoDataFixture Magento/CatalogSearch/_files/full_reindex.php
31- * @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix suggested_queries_test
32- * @magentoConfigFixture current_store catalog/search/search_suggestion_enabled 1
33- * @magentoConfigFixture current_store catalog/search/search_suggestion_count 8
34- */
32+ #[
33+ DbIsolation(false ),
34+ FixtureConfig(
35+ 'catalog/search/elasticsearch_index_prefix ' ,
36+ 'suggested_queries_test ' ,
37+ ScopeInterface::SCOPE_STORE
38+ ),
39+ FixtureConfig(SuggestedQueriesInterface::SEARCH_SUGGESTION_ENABLED , 1 , ScopeInterface::SCOPE_STORE ),
40+ FixtureConfig(SuggestedQueriesInterface::SEARCH_SUGGESTION_COUNT , 8 , ScopeInterface::SCOPE_STORE ),
41+ DataFixture(ProductFixture::class, ['name ' => 'fresh arugula salad ' ]),
42+ DataFixture('Magento/CatalogSearch/_files/full_reindex.php ' ),
43+ ]
3544 public function testGetItems (): void
3645 {
3746 $ query = Bootstrap::getObjectManager ()
0 commit comments