From e523517e03d3f54daaa33b4e48743a0f065fba0f Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 8 Nov 2012 11:01:34 -0500 Subject: [PATCH] [ticket/11174] Test for common words. PHPBB3-11174 --- tests/search/fixtures/posts.xml | 10 ++++++++++ tests/search/native_test.php | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) 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 @@ bar bar + + commonword + commonword + commonword + word_id @@ -29,5 +34,10 @@ bar0 + + 3 + commonword + 1 +
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(), + ), ); }