You are here

protected function ElasticsearchTest::clearIndex in Elasticsearch Connector 8

Same name and namespace in other branches
  1. 8.2 src/Tests/ElasticsearchTest.php \Drupal\elasticsearch_connector\Tests\ElasticsearchTest::clearIndex()

File

src/Tests/ElasticsearchTest.php, line 101
Contains \Drupal\elasticsearch_connector\Tests\ElasticsearchTest.

Class

ElasticsearchTest
Tests index and search capabilities using the elasticsearch backend.

Namespace

Drupal\elasticsearch_connector\Tests

Code

protected function clearIndex() {
  $server = Server::load($this->serverId);
  $index = Index::load($this->indexId);
  $server
    ->getBackend()
    ->removeIndex($index);
}