aboutsummaryrefslogtreecommitdiffstats
path: root/tests/search/mysql_test.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-11-27 08:22:43 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-27 08:49:06 -0500
commit4d1486b08cd2f1e75527ed3b54664361934258a7 (patch)
tree1fc8d1640d2e8f47f5acddb08f49357b83e28eb0 /tests/search/mysql_test.php
parenta5900a6b1120a3d062e6d51579872bf940b13dcb (diff)
downloadforums-4d1486b08cd2f1e75527ed3b54664361934258a7.tar
forums-4d1486b08cd2f1e75527ed3b54664361934258a7.tar.gz
forums-4d1486b08cd2f1e75527ed3b54664361934258a7.tar.bz2
forums-4d1486b08cd2f1e75527ed3b54664361934258a7.tar.xz
forums-4d1486b08cd2f1e75527ed3b54664361934258a7.zip
[ticket/11174] Eliminate search wrapper copy pasting.
PHPBB3-11174
Diffstat (limited to 'tests/search/mysql_test.php')
-rw-r--r--tests/search/mysql_test.php20
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/search/mysql_test.php b/tests/search/mysql_test.php
index 5e5d5c9846..cf89facc83 100644
--- a/tests/search/mysql_test.php
+++ b/tests/search/mysql_test.php
@@ -7,23 +7,9 @@
*
*/
-function phpbb_search_wrapper($class)
-{
- $wrapped = $class . '_wrapper';
- if (!class_exists($wrapped))
- {
- $code = "
-class $wrapped extends $class
-{
- public function get_split_words() { return \$this->split_words; }
-}
- ";
- eval($code);
- }
- return $wrapped;
-}
+require_once dirname(__FILE__) . '/../test_framework/phpbb_search_test_case.php';
-class phpbb_search_mysql_test extends phpbb_database_test_case
+class phpbb_search_mysql_test extends phpbb_search_test_case
{
protected $db;
protected $search;
@@ -48,7 +34,7 @@ class phpbb_search_mysql_test extends phpbb_database_test_case
$this->db = $this->new_dbal();
$error = null;
- $class = phpbb_search_wrapper('phpbb_search_fulltext_mysql');
+ $class = self::get_search_wrapper('phpbb_search_fulltext_mysql');
$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
}