You are here

protected function AbstractDrupalSolrOnlineWebTestCase::getSolrVersion in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 tests/solr_index_and_search.test \AbstractDrupalSolrOnlineWebTestCase::getSolrVersion()
  2. 7 tests/solr_index_and_search.test \AbstractDrupalSolrOnlineWebTestCase::getSolrVersion()
1 call to AbstractDrupalSolrOnlineWebTestCase::getSolrVersion()
AbstractDrupalSolrOnlineWebTestCase::setUpSolr in tests/solr_index_and_search.test

File

tests/solr_index_and_search.test, line 111

Class

AbstractDrupalSolrOnlineWebTestCase

Code

protected function getSolrVersion() {
  $status = $this
    ->coreAdmin('STATUS');
  foreach ($status['status'] as $core_id => $core) {
    $solr = new DrupalApacheSolrService($this->base_solr_url . '/' . $core_id);
    $version = $solr
      ->getSolrVersion();
    if (!empty($version)) {
      return $version;
    }
    else {
      return "1";
    }
  }
}