aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_search_test_case.php
blob: 418d352c17f363f226543ca5d1f73b7fadefc4e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
*
* @package testing
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

abstract class phpbb_search_test_case extends phpbb_database_test_case
{
	static protected function get_search_wrapper($class)
	{
		$wrapped = $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;
	}
}