protected function SolrBackendTestBase::getSolrVersion 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::getSolrVersion()
- 8.2 tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::getSolrVersion()
Gets the Solr version.
Throws
\Drupal\search_api\SearchApiException
1 call to SolrBackendTestBase::getSolrVersion()
- SearchApiSolrLocationTest::testBackend in tests/
src/ Kernel/ SearchApiSolrLocationTest.php - Tests location searches and distance facets.
File
- tests/
src/ Kernel/ SolrBackendTestBase.php, line 180
Class
- SolrBackendTestBase
- Tests location searches and distance facets using the Solr search backend.
Namespace
Drupal\Tests\search_api_solr\KernelCode
protected function getSolrVersion() {
static $solr_version = FALSE;
if (!$solr_version) {
/** @var \Drupal\search_api_solr\SolrBackendInterface $backend */
$backend = Server::load($this->serverId)
->getBackend();
$connector = $backend
->getSolrConnector();
$solr_version = $connector
->getSolrVersion();
}
return $solr_version;
}