Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
ElasticsearchTest Class Reference
Inheritance diagram for ElasticsearchTest:

Public Member Functions

 testSearchConfigurableProductBySimpleProductName ()
 
 testSearchConfigurableProductBySimpleProductAttributeMultiselect ()
 
 testSearchConfigurableProductBySimpleProductAttributeSelect ()
 
 testSearchConfigurableProductBySimpleProductAttributeShortDescription ()
 

Protected Member Functions

 setUp ()
 

Detailed Description

@magentoDbIsolation enabled @magentoAppIsolation enabled @magentoDataFixture Magento/Elasticsearch/_files/configurable_products.php

Definition at line 22 of file ElasticsearchTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 54 of file ElasticsearchTest.php.

55  {
57  $this->connectionManager = $objectManager->create(ConnectionManager::class);
58  $this->client = $this->connectionManager->getConnection();
59  $this->storeManager = $objectManager->create(StoreManagerInterface::class);
60  $this->clientConfig = $objectManager->create(Config::class);
61  $this->searchIndexNameResolver = $objectManager->create(SearchIndexNameResolver::class);
62  $this->productRepository = $objectManager->create(ProductRepositoryInterface::class);
63  $indexer = $objectManager->create(Indexer::class);
64  $indexer->load('catalogsearch_fulltext');
65  $indexer->reindexAll();
66  }
$objectManager
Definition: bootstrap.php:17

◆ testSearchConfigurableProductBySimpleProductAttributeMultiselect()

testSearchConfigurableProductBySimpleProductAttributeMultiselect ( )

@magentoConfigFixture default/catalog/search/engine elasticsearch @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search

Definition at line 110 of file ElasticsearchTest.php.

111  {
112  $this->assertProductWithSkuFound('configurable', $this->search('dog'));
113  }

◆ testSearchConfigurableProductBySimpleProductAttributeSelect()

testSearchConfigurableProductBySimpleProductAttributeSelect ( )

@magentoConfigFixture default/catalog/search/engine elasticsearch @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search

Definition at line 119 of file ElasticsearchTest.php.

120  {
121  $this->assertProductWithSkuFound('configurable', $this->search('chair'));
122  }

◆ testSearchConfigurableProductBySimpleProductAttributeShortDescription()

testSearchConfigurableProductBySimpleProductAttributeShortDescription ( )

@magentoConfigFixture default/catalog/search/engine elasticsearch @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search

Definition at line 128 of file ElasticsearchTest.php.

129  {
130  $this->assertProductWithSkuFound('configurable', $this->search('simpledescription'));
131  }

◆ testSearchConfigurableProductBySimpleProductName()

testSearchConfigurableProductBySimpleProductName ( )

@magentoConfigFixture default/catalog/search/engine elasticsearch @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search

Definition at line 101 of file ElasticsearchTest.php.

102  {
103  $this->assertProductWithSkuFound('configurable', $this->search('Configurable Option'));
104  }

The documentation for this class was generated from the following file: