diff options
Diffstat (limited to 'tests/test_framework/phpbb_search_test_case.php')
| -rw-r--r-- | tests/test_framework/phpbb_search_test_case.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_search_test_case.php b/tests/test_framework/phpbb_search_test_case.php new file mode 100644 index 0000000000..b37ed1d039 --- /dev/null +++ b/tests/test_framework/phpbb_search_test_case.php @@ -0,0 +1,33 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +abstract class phpbb_search_test_case extends phpbb_database_test_case +{ + static protected function get_search_wrapper($class) + { + $wrapped = str_replace('\\', '_', $class) . '_wrapper'; + if (!class_exists($wrapped)) + { + $code = " +class $wrapped extends $class +{ + public function get_must_contain_ids() { return \$this->must_contain_ids; } + public function get_must_not_contain_ids() { return \$this->must_not_contain_ids; } + public function get_split_words() { return \$this->split_words; } +} + "; + eval($code); + } + return $wrapped; + } +} |
