aboutsummaryrefslogtreecommitdiffstats
path: root/tests/search/mysql_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/search/mysql_test.php')
-rw-r--r--tests/search/mysql_test.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/search/mysql_test.php b/tests/search/mysql_test.php
new file mode 100644
index 0000000000..3ba3915714
--- /dev/null
+++ b/tests/search/mysql_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_mysql_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_mysql_min_word_len'] = 4;
+ $config['fulltext_mysql_max_word_len'] = 254;
+
+ $this->db = $this->new_dbal();
+ $error = null;
+ $class = self::get_search_wrapper('phpbb_search_fulltext_mysql');
+ $this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
+ }
+}