2012-11-27 08:18:39 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
*
|
2014-05-27 20:18:06 +02:00
|
|
|
* 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.
|
2012-11-27 08:18:39 -05:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
abstract class phpbb_search_test_case extends phpbb_database_test_case
|
|
|
|
{
|
|
|
|
static protected function get_search_wrapper($class)
|
|
|
|
{
|
2013-09-10 15:43:16 +02:00
|
|
|
$wrapped = str_replace('\\', '_', $class) . '_wrapper';
|
2012-11-27 08:18:39 -05:00
|
|
|
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; }
|
2012-11-27 08:22:43 -05:00
|
|
|
public function get_split_words() { return \$this->split_words; }
|
2012-11-27 08:18:39 -05:00
|
|
|
}
|
|
|
|
";
|
|
|
|
eval($code);
|
|
|
|
}
|
|
|
|
return $wrapped;
|
|
|
|
}
|
|
|
|
}
|