public function DoubleQuoteWorkaroundTest::setUp in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/Processor/DoubleQuoteWorkaroundTest.php \Drupal\Tests\search_api_solr\Kernel\Processor\DoubleQuoteWorkaroundTest::setUp()
- 8.2 tests/src/Kernel/Processor/DoubleQuoteWorkaroundTest.php \Drupal\Tests\search_api_solr\Kernel\Processor\DoubleQuoteWorkaroundTest::setUp()
File
- tests/
src/ Kernel/ Processor/ DoubleQuoteWorkaroundTest.php, line 36
Class
- DoubleQuoteWorkaroundTest
- Tests the "Double Quote Workaround" processor.
Namespace
Drupal\Tests\search_api_solr\Kernel\ProcessorCode
public function setUp($processor = NULL) : void {
parent::setUp('double_quote_workaround');
$this
->enableSolrServer();
$backend = $this->index
->getServerInstance()
->getBackend();
$config = $backend
->getConfiguration();
// Streaming expressions are only supported by Solr Cloud.
$config['connector'] = 'solr_cloud';
$backend
->setConfiguration($config);
$this->queryHelper = \Drupal::getContainer()
->get('search_api_solr.streaming_expression_query_helper');
$this->query = $this->queryHelper
->createQuery($this->index);
$this->exp = $this->queryHelper
->getStreamingExpressionBuilder($this->query);
}