aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-11-08 11:01:34 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-08 11:01:34 -0500
commite523517e03d3f54daaa33b4e48743a0f065fba0f (patch)
tree073ec75d2d612021214351bceeca7372af49d000
parent1aa0b4567fc1849712471e129b868927f400f773 (diff)
downloadforums-e523517e03d3f54daaa33b4e48743a0f065fba0f.tar
forums-e523517e03d3f54daaa33b4e48743a0f065fba0f.tar.gz
forums-e523517e03d3f54daaa33b4e48743a0f065fba0f.tar.bz2
forums-e523517e03d3f54daaa33b4e48743a0f065fba0f.tar.xz
forums-e523517e03d3f54daaa33b4e48743a0f065fba0f.zip
[ticket/11174] Test for common words.
PHPBB3-11174
-rw-r--r--tests/search/fixtures/posts.xml10
-rw-r--r--tests/search/native_test.php16
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/search/fixtures/posts.xml b/tests/search/fixtures/posts.xml
index 875af55599..7b249ee303 100644
--- a/tests/search/fixtures/posts.xml
+++ b/tests/search/fixtures/posts.xml
@@ -14,6 +14,11 @@
<value>bar</value>
<value>bar</value>
</row>
+ <row>
+ <value>commonword</value>
+ <value>commonword</value>
+ <value>commonword</value>
+ </row>
</table>
<table name="phpbb_search_wordlist">
<column>word_id</column>
@@ -29,5 +34,10 @@
<value>bar</value>
<value>0</value>
</row>
+ <row>
+ <value>3</value>
+ <value>commonword</value>
+ <value>1</value>
+ </row>
</table>
</dataset>
diff --git a/tests/search/native_test.php b/tests/search/native_test.php
index 8638a914ba..3726b96a82 100644
--- a/tests/search/native_test.php
+++ b/tests/search/native_test.php
@@ -121,6 +121,22 @@ class phpbb_search_native_test extends phpbb_database_test_case
array(),
array(),
),
+ // all common
+ array(
+ 'commonword',
+ 'all',
+ false,
+ array(),
+ array(),
+ ),
+ // some common
+ array(
+ 'commonword foo',
+ 'all',
+ true,
+ array(1),
+ array(),
+ ),
);
}