protected function ElasticsearchTest::checkModuleUninstall in Elasticsearch Connector 8.2
Same name and namespace in other branches
- 8 src/Tests/ElasticsearchTest.php \Drupal\elasticsearch_connector\Tests\ElasticsearchTest::checkModuleUninstall()
File
- src/
Tests/ ElasticsearchTest.php, line 193
Class
- ElasticsearchTest
- Tests index and search capabilities using the elasticsearch backend.
Namespace
Drupal\elasticsearch_connector\TestsCode
protected function checkModuleUninstall() {
// See whether clearing the server works.
// Regression test for #2156151.
$server = Server::load($this->serverId);
$index = Index::load($this->indexId);
$server
->getBackend()
->removeIndex($index);
$query = $this
->buildSearch();
$results = $query
->execute();
$this
->assertEqual($results
->getResultCount(), 0, 'Clearing the server worked correctly.');
}