function DrupalSolrMatchTestCase::_testQueryMatching in Apache Solr Search 6.2
Same name and namespace in other branches
- 8 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::_testQueryMatching()
- 6.3 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::_testQueryMatching()
- 6 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::_testQueryMatching()
- 7 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::_testQueryMatching()
Test the matching abilities of the engine.
Verify if a query produces the correct results.
1 call to DrupalSolrMatchTestCase::_testQueryMatching()
- DrupalSolrMatchTestCase::_testQueries in tests/
solr_index_and_search.test - Run predefine queries looking for indexed terms.
File
- tests/
solr_index_and_search.test, line 163 - Tests for the apachsolr module: index and search.
Class
- DrupalSolrMatchTestCase
- @file Tests for the apachsolr module: index and search.
Code
function _testQueryMatching($query, $set, $results) {
// Get result IDs.
$found = array();
foreach ($set as $item) {
$found[] = $item->nid;
}
// Compare $results and $found.
sort($found);
sort($results);
$this
->assertEqual($found, $results, "Query matching '{$query}'");
}