function SearchMatchTest::_test_query_matching in SimpleTest 5
Same name and namespace in other branches
- 6 tests/search_match.test \SearchMatchTest::_test_query_matching()
Test the matching abilities of the engine.
Verify if a query produces the correct results.
1 call to SearchMatchTest::_test_query_matching()
File
- tests/
search_match.test, line 135
Class
Code
function _test_query_matching($query, $set, $results) {
// Get result IDs.
$found = array();
foreach ($set as $item) {
$found[] = $item->sid;
}
// Compare $results and $found.
sort($found);
sort($results);
$this
->assertEqual($found, $results, "Query matching '{$query}'");
}