mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +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
|
// dbal uses cache
|
||||||
$cache = new phpbb_cache_driver_null;
|
$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();
|
$this->db = $this->new_dbal();
|
||||||
$error = null;
|
$error = null;
|
||||||
$class = phpbb_search_wrapper('phpbb_search_fulltext_mysql');
|
$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
|
// leading, trailing and multiple spaces
|
||||||
array(
|
array(
|
||||||
' foo bar ',
|
' fooo baar ',
|
||||||
'all',
|
'all',
|
||||||
true,
|
true,
|
||||||
array('foo', 'bar'),
|
array('fooo', 'baar'),
|
||||||
array(),
|
array(),
|
||||||
),
|
),
|
||||||
// words too short
|
// words too short
|
||||||
|
@ -100,25 +104,32 @@ class phpbb_search_mysql_test extends phpbb_database_test_case
|
||||||
array('f', 'o', 'o'),
|
array('f', 'o', 'o'),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'foo -bar',
|
'f -o -o',
|
||||||
|
'all',
|
||||||
|
false,
|
||||||
|
null,
|
||||||
|
array('f', '-o', '-o'),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'fooo -baar',
|
||||||
'all',
|
'all',
|
||||||
true,
|
true,
|
||||||
array('-bar', 'foo'),
|
array('-baar', 'fooo'),
|
||||||
array(),
|
array(),
|
||||||
),
|
),
|
||||||
// all negative
|
// all negative
|
||||||
array(
|
array(
|
||||||
'-foo',
|
'-fooo',
|
||||||
'all',
|
'all',
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
array(),
|
array(),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'-foo -bar',
|
'-fooo -baar',
|
||||||
'all',
|
'all',
|
||||||
false,
|
false,
|
||||||
array('-foo', '-bar'),
|
array('-fooo', '-baar'),
|
||||||
array(),
|
array(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue