7
7
8
8
namespace Magento \AdvancedSearch \Model ;
9
9
10
+ use Magento \Catalog \Test \Fixture \Product as ProductFixture ;
10
11
use 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 ;
11
16
use Magento \TestFramework \Helper \Bootstrap ;
12
17
use PHPUnit \Framework \TestCase ;
13
18
@@ -24,14 +29,18 @@ protected function setUp(): void
24
29
->create (SuggestedQueries::class);
25
30
}
26
31
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
+ ]
35
44
public function testGetItems (): void
36
45
{
37
46
$ query = Bootstrap::getObjectManager ()
0 commit comments