aboutsummaryrefslogtreecommitdiffstats
path: root/tests/search/postgres_test.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-12-07 13:31:37 -0800
committerIgor Wiedler <igor@wiedler.ch>2012-12-07 13:31:37 -0800
commitb0b5a13131b90b8320de6f49db6c505d38b42c96 (patch)
tree641a33e35665c3b8198fd2d641a687560342ba56 /tests/search/postgres_test.php
parent74093d0fd383619ec8b58914ebe2edd68145e070 (diff)
parent26fd70d9cdffe0107635db5f3846dbe5ea6e3fae (diff)
downloadforums-b0b5a13131b90b8320de6f49db6c505d38b42c96.tar
forums-b0b5a13131b90b8320de6f49db6c505d38b42c96.tar.gz
forums-b0b5a13131b90b8320de6f49db6c505d38b42c96.tar.bz2
forums-b0b5a13131b90b8320de6f49db6c505d38b42c96.tar.xz
forums-b0b5a13131b90b8320de6f49db6c505d38b42c96.zip
Merge pull request #18 from p/ticket/11015
Ticket/11015
Diffstat (limited to 'tests/search/postgres_test.php')
-rw-r--r--tests/search/postgres_test.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/search/postgres_test.php b/tests/search/postgres_test.php
new file mode 100644
index 0000000000..9c77e0c09e
--- /dev/null
+++ b/tests/search/postgres_test.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/common_test_case.php';
+
+class phpbb_search_postgres_test extends phpbb_search_common_test_case
+{
+ protected $db;
+ protected $search;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
+ }
+
+ protected function setUp()
+ {
+ global $phpbb_root_path, $phpEx, $config, $user, $cache;
+
+ parent::setUp();
+
+ // dbal uses cache
+ $cache = new phpbb_cache_service(new phpbb_cache_driver_null);
+
+ // set config values
+ $config['fulltext_postgres_min_word_len'] = 4;
+ $config['fulltext_postgres_max_word_len'] = 254;
+
+ $this->db = $this->new_dbal();
+ $error = null;
+ $class = self::get_search_wrapper('phpbb_search_fulltext_postgres');
+ $this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
+ }
+}