You are here

solr_base_query.test in Apache Solr Search 6

Tests for the apachsolr module: base query.

File

tests/solr_base_query.test
View source
<?php

/**
 * @file
 *   Tests for the apachsolr module: base query.
 */

/**
 * JacobSingh: Warning! This test is totally broken because of the addition of the "hash" in apachesolr_search.module.
 * Needs to be moved out.
 */
class DrupalSolrQueryTests extends DrupalWebTestCase {
  function getInfo() {
    return array(
      'name' => 'Query handling',
      'description' => 'Throw various queries at the query object and make sure they all parse correctly.',
      'group' => 'ApacheSolr',
    );
  }
  function setUp() {
    parent::setUp('search', 'apachesolr');
  }
  private $queries = array(
    'foo',
    'foo bar',
    'foo bar "hubba baz"',
    'uid:1',
    'uid:1 uid:2',
    'foo bar uid:1 uid:2',
    'foo bar "I love you"',
    'foo bar baz -hubba',
    'foo -bar -term:31',
    'foo*',
    'foo?',
    'somefield:"I love you"',
  );

}

Classes

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