protected function SolrBackendTestBase::clearIndex in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::clearIndex()
- 8.2 tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::clearIndex()
2 calls to SolrBackendTestBase::clearIndex()
- SearchApiSolrTest::checkBackendSpecificFeatures in tests/
src/ Kernel/ SearchApiSolrTest.php - Checks backend specific features.
- SolrBackendTestBase::tearDown in tests/
src/ Kernel/ SolrBackendTestBase.php - Clear the index after every test.
File
- tests/
src/ Kernel/ SolrBackendTestBase.php, line 118
Class
- SolrBackendTestBase
- Tests location searches and distance facets using the Solr search backend.
Namespace
Drupal\Tests\search_api_solr\KernelCode
protected function clearIndex() {
$index = Index::load($this->indexId);
$index
->clear();
$this
->ensureCommit($index);
}