You are here

function DrupalSolrQueryTests::testParseSimple in Apache Solr Search 6.2

Same name and namespace in other branches
  1. 5 tests/solr_base_query.test \DrupalSolrQueryTests::testParseSimple()

File

tests/solr_base_query.test, line 41
Tests for the apachsolr module: base query.

Class

DrupalSolrQueryTests
JacobSingh: Warning! This test is totally broken because of the addition of the "hash" in apachesolr_search.module. Needs to be moved out.

Code

function testParseSimple() {
  foreach ($this->queries as $string) {
    $query = apachesolr_drupal_query($string);

    // force the query to be rebuilt without removing any fields.
    $query
      ->remove_filter('fake-field-name');
    $this
      ->assertEqual($string, $query
      ->get_query_basic());
  }
}