aboutsummaryrefslogtreecommitdiffstats
path: root/tests/search/native_test.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2015-01-28 21:46:38 +0530
committerDhruv <dhruv.goel92@gmail.com>2015-01-28 21:46:38 +0530
commit35edd7a0433b5d8f74febf62f192aabaefbe61b6 (patch)
tree2d91c621c60c653b7c25fa8dbe4e73d11b8d48e3 /tests/search/native_test.php
parent252018b8131debcbcd67cec33cd0abaa7e83b7d6 (diff)
downloadforums-35edd7a0433b5d8f74febf62f192aabaefbe61b6.tar
forums-35edd7a0433b5d8f74febf62f192aabaefbe61b6.tar.gz
forums-35edd7a0433b5d8f74febf62f192aabaefbe61b6.tar.bz2
forums-35edd7a0433b5d8f74febf62f192aabaefbe61b6.tar.xz
forums-35edd7a0433b5d8f74febf62f192aabaefbe61b6.zip
[ticket/12933] Add test cases for * wildcard searches
PHPBB3-12933
Diffstat (limited to 'tests/search/native_test.php')
-rw-r--r--tests/search/native_test.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/search/native_test.php b/tests/search/native_test.php
index f681a62fce..61fde7d098 100644
--- a/tests/search/native_test.php
+++ b/tests/search/native_test.php
@@ -35,6 +35,8 @@ class phpbb_search_native_test extends phpbb_search_test_case
$this->db = $this->new_dbal();
$error = null;
$class = self::get_search_wrapper('\phpbb\search\fulltext_native');
+ $config['fulltext_native_min_chars'] = 2;
+ $config['fulltext_native_max_chars'] = 14;
$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
}
@@ -56,6 +58,54 @@ class phpbb_search_native_test extends phpbb_search_test_case
array(),
),
array(
+ 'baaz*',
+ 'all',
+ true,
+ array('\'baaz%\''),
+ array(),
+ array(),
+ ),
+ array(
+ 'ba*az',
+ 'all',
+ true,
+ array('\'ba%az\''),
+ array(),
+ array(),
+ ),
+ array(
+ 'ba*z',
+ 'all',
+ true,
+ array('\'ba%z\''),
+ array(),
+ array(),
+ ),
+ array(
+ 'baa* baaz*',
+ 'all',
+ true,
+ array('\'baa%\'', '\'baaz%\''),
+ array(),
+ array(),
+ ),
+ array(
+ 'ba*z baa*',
+ 'all',
+ true,
+ array('\'ba%z\'', '\'baa%\''),
+ array(),
+ array(),
+ ),
+ array(
+ 'baaz* commonword',
+ 'all',
+ true,
+ array('\'baaz%\''),
+ array(),
+ array('commonword'),
+ ),
+ array(
'foo bar',
'all',
true,