Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
phpbb_search_test_case
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 get_search_wrapper
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2/**
3*
4* This file is part of the phpBB Forum Software package.
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license GNU General Public License, version 2 (GPL-2.0)
8*
9* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12*/
13
14abstract class phpbb_search_test_case extends phpbb_database_test_case
15{
16    protected static function get_search_wrapper($class)
17    {
18        $wrapped = str_replace('\\', '_', $class) . '_wrapper';
19        if (!class_exists($wrapped))
20        {
21            $code = "
22class $wrapped extends $class
23{
24    public function get_must_contain_ids() { return \$this->must_contain_ids; }
25    public function get_must_not_contain_ids() { return \$this->must_not_contain_ids; }
26    public function get_split_words() { return \$this->split_words; }
27}
28            ";
29            eval($code);
30        }
31        return $wrapped;
32    }
33}