You are here

private function DrupalSolrFilterSubQueryTests::_apachesolr_drupal_query in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 tests/solr_base_subquery.test \DrupalSolrFilterSubQueryTests::_apachesolr_drupal_query()
  2. 7 tests/solr_base_subquery.test \DrupalSolrFilterSubQueryTests::_apachesolr_drupal_query()

Helper function to simulate the auto loading and other non-needed functions that otherwise require a database

Return value

SolrBaseQuery

See also

apachesolr_drupal_query().

1 call to DrupalSolrFilterSubQueryTests::_apachesolr_drupal_query()
DrupalSolrFilterSubQueryTests::testSubQueriesQuery in tests/solr_base_subquery.test

File

tests/solr_base_subquery.test, line 32
Unit tests for subquery object methods.

Class

DrupalSolrFilterSubQueryTests
@file Unit tests for subquery object methods.

Code

private function _apachesolr_drupal_query($name, $params = array(), $solrsort = '', $base_path = '', $solr = NULL) {
  if (empty($solr)) {
    $solr = new DummySolr(NULL);
  }
  return new SolrBaseQuery($name, $solr, $params, $solrsort, $base_path);
}