You are here

public function SearchApiSolrMultilingualTest::setUp in Search API Multilingual Solr Search 8

File

tests/src/Kernel/SearchApiSolrMultilingualTest.php, line 53

Class

SearchApiSolrMultilingualTest
Tests index and search capabilities using the Solr search backend.

Namespace

Drupal\Tests\search_api_solr_multilingual\Kernel

Code

public function setUp() {
  BackendTestBase::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installConfig([
    'search_api_solr',
    'search_api_solr_multilingual',
    'search_api_solr_multilingual_test',
  ]);
  $this->logger = $this
    ->createMock('Psr\\Log\\LoggerInterface');
  $this->logger
    ->method('log')
    ->willThrowException(new \Exception('logger triggered'));
  \Drupal::getContainer()
    ->get('logger.factory')
    ->addLogger($this->logger);
  $this
    ->detectSolrAvailability();
  $this->fieldsHelper = \Drupal::getContainer()
    ->get('search_api.fields_helper');
}