public function ElasticsearchTest::setUp in Elasticsearch Connector 8
Same name and namespace in other branches
- 8.2 src/Tests/ElasticsearchTest.php \Drupal\elasticsearch_connector\Tests\ElasticsearchTest::setUp()
File
- src/
Tests/ ElasticsearchTest.php, line 60 - Contains \Drupal\elasticsearch_connector\Tests\ElasticsearchTest.
Class
- ElasticsearchTest
- Tests index and search capabilities using the elasticsearch backend.
Namespace
Drupal\elasticsearch_connector\TestsCode
public function setUp() {
parent::setUp();
$this
->installConfig(array(
'elasticsearch_test',
));
try {
/** @var \Drupal\search_api\Entity\Server $server */
$server = Server::load($this->serverId);
if ($server
->getBackend()
->ping()) {
$this->elasticsearchAvailable = TRUE;
}
} catch (\Exception $e) {
}
}