mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/11174] set config values
set config values and use min length as 4 for wordss in test cases PHPBB3-11174
This commit is contained in:
parent
2d1ac34de6
commit
9d597dc2ee
1 changed files with 18 additions and 7 deletions
|
@ -42,6 +42,10 @@ class phpbb_search_mysql_test extends phpbb_database_test_case
|
|||
// dbal uses cache
|
||||
$cache = new phpbb_cache_driver_null;
|
||||
|
||||
// set config values
|
||||
$config['fulltext_mysql_min_word_len'] = 4;
|
||||
$config['fulltext_mysql_max_word_len'] = 254;
|
||||
|
||||
$this->db = $this->new_dbal();
|
||||
$error = null;
|
||||
$class = phpbb_search_wrapper('phpbb_search_fulltext_mysql');
|
||||
|
@ -77,10 +81,10 @@ class phpbb_search_mysql_test extends phpbb_database_test_case
|
|||
),
|
||||
// leading, trailing and multiple spaces
|
||||
array(
|
||||
' foo bar ',
|
||||
' fooo baar ',
|
||||
'all',
|
||||
true,
|
||||
array('foo', 'bar'),
|
||||
array('fooo', 'baar'),
|
||||
array(),
|
||||
),
|
||||
// words too short
|
||||
|
@ -100,25 +104,32 @@ class phpbb_search_mysql_test extends phpbb_database_test_case
|
|||
array('f', 'o', 'o'),
|
||||
),
|
||||
array(
|
||||
'foo -bar',
|
||||
'f -o -o',
|
||||
'all',
|
||||
false,
|
||||
null,
|
||||
array('f', '-o', '-o'),
|
||||
),
|
||||
array(
|
||||
'fooo -baar',
|
||||
'all',
|
||||
true,
|
||||
array('-bar', 'foo'),
|
||||
array('-baar', 'fooo'),
|
||||
array(),
|
||||
),
|
||||
// all negative
|
||||
array(
|
||||
'-foo',
|
||||
'-fooo',
|
||||
'all',
|
||||
false,
|
||||
null,
|
||||
array(),
|
||||
),
|
||||
array(
|
||||
'-foo -bar',
|
||||
'-fooo -baar',
|
||||
'all',
|
||||
false,
|
||||
array('-foo', '-bar'),
|
||||
array('-fooo', '-baar'),
|
||||
array(),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue