You are here

private function SolrBaseQueryTests::_apachesolr_drupal_query in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 tests/solr_base_query.test \SolrBaseQueryTests::_apachesolr_drupal_query()
  2. 7 tests/solr_base_query.test \SolrBaseQueryTests::_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().

2 calls to SolrBaseQueryTests::_apachesolr_drupal_query()
SolrBaseQueryTests::testAddParams in tests/solr_base_query.test
SolrBaseQueryTests::testParseFilters in tests/solr_base_query.test
Test ordering of parsed filter positions.

File

tests/solr_base_query.test, line 30

Class

SolrBaseQueryTests
Unit tests for query 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);
}