function SearchMatchTest::_test_queries in SimpleTest 5
Same name and namespace in other branches
- 6 tests/search_match.test \SearchMatchTest::_test_queries()
1 call to SearchMatchTest::_test_queries()
- SearchMatchTest::test_matching in tests/search_match.test
File
- tests/search_match.test, line 70
Class
- SearchMatchTest
Code
function _test_queries() {
$queries = array(
'ipsum' => array(
1,
),
'enim' => array(
4,
5,
6,
),
'xxxxx' => array(),
'enim minim' => array(
5,
6,
),
'enim xxxxx' => array(),
'dolore eu' => array(
7,
),
'dolore xx' => array(),
'ut minim' => array(
5,
),
'xx minim' => array(),
'enim veniam am minim ut' => array(
5,
),
'dolore OR ipsum' => array(
1,
2,
7,
),
'dolore OR xxxxx' => array(
2,
7,
),
'dolore OR ipsum OR enim' => array(
1,
2,
4,
5,
6,
7,
),
'ipsum OR dolore sit OR cillum' => array(
2,
7,
),
'minim dolore OR ipsum' => array(
7,
),
'dolore OR ipsum veniam' => array(
7,
),
'minim dolore OR ipsum OR enim' => array(
5,
6,
7,
),
'dolore xx OR yy' => array(),
'xxxxx dolore OR ipsum' => array(),
'dolore -sit' => array(
7,
),
'dolore -eu' => array(
2,
),
'dolore -xxxxx' => array(
2,
7,
),
'dolore -xx' => array(
2,
7,
),
'"dolore sit"' => array(
2,
),
'"sit dolore"' => array(),
'"am minim veniam es"' => array(
6,
7,
),
'"minim am veniam es"' => array(),
'"am minim veniam es" OR dolore' => array(
2,
6,
7,
),
'"minim am veniam es" OR "dolore sit"' => array(
2,
),
'"minim am veniam es" OR "sit dolore"' => array(),
'"am minim veniam es" -eu' => array(
6,
),
'"am minim veniam" -"cillum dolore"' => array(
5,
6,
),
'"am minim veniam" -"dolore cillum"' => array(
5,
6,
7,
),
'xxxxx "minim am veniam es" OR dolore' => array(),
'xx "minim am veniam es" OR dolore' => array(),
);
foreach ($queries as $query => $results) {
$set = do_search($query, SEARCH_TYPE);
$this
->_test_query_matching($query, $set, $results);
$this
->_test_query_scores($query, $set, $results);
$this
->_cleanup_query();
}
}