diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2012-11-29 18:55:56 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2012-11-29 18:55:56 +0100 |
| commit | aaacfae428a354b76a7197452ed94aa77b128ea5 (patch) | |
| tree | 56853eaf0497e71fdd13bf9ee1b2ccf810973c4d /tests/test_framework/phpbb_search_test_case.php | |
| parent | b453f359ff6dab58b0eaf94548c4e58110fb02ec (diff) | |
| parent | 79237b60b6b234e10f14cbcb00691b5e4374fd04 (diff) | |
| download | forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar.gz forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar.bz2 forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar.xz forums-aaacfae428a354b76a7197452ed94aa77b128ea5.zip | |
Merge remote-tracking branch 'p/ticket/11174' into develop
* p/ticket/11174:
[ticket/11174] Global $cache is a cache service instance.
[ticket/11174] Delete more copy pasting.
[ticket/11174] Drop needless teardown functions.
[ticket/11174] These tests do not need posts fixtures.
[ticket/11174] Empty fixture for when we don't need any data.
[ticket/11174] Eliminate search wrapper copy pasting.
[ticket/11174] Extract phpbb_search_test_case.
[ticket/11174] Delete copy pasting.
[ticket/11174] Move assertion definition to base class.
[ticket/11174] add unit tests for postgres search backend
[ticket/11174] include utf_tools in postgres search backend
[ticket/11174] negation queries do not return false
[ticket/11174] set config values
[ticket/11174] add test case for native test
[ticket/11174] rename native wrapper class
[ticket/11174] add mysql unit tests
[ticket/11174] removes unnecessary space from word
[ticket/11174] include utf_tools in mysql backend
Diffstat (limited to 'tests/test_framework/phpbb_search_test_case.php')
| -rw-r--r-- | tests/test_framework/phpbb_search_test_case.php | 29 |
1 files changed, 29 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..418d352c17 --- /dev/null +++ b/tests/test_framework/phpbb_search_test_case.php @@ -0,0 +1,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; + } +} |
