mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 04:13:29 +02:00
[ticket/13685] Fix tests for fulltext search
PHPBB3-13685
This commit is contained in:
parent
1e45a05000
commit
3cb86cb6f1
@ -37,8 +37,9 @@ class phpbb_search_mysql_test extends phpbb_search_common_test_case
|
||||
$config['fulltext_mysql_max_word_len'] = 254;
|
||||
|
||||
$this->db = $this->new_dbal();
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
$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);
|
||||
$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user, $phpbb_dispatcher);
|
||||
}
|
||||
}
|
||||
|
@ -33,11 +33,12 @@ class phpbb_search_native_test extends phpbb_search_test_case
|
||||
$cache = new phpbb_mock_cache();
|
||||
|
||||
$this->db = $this->new_dbal();
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
$error = null;
|
||||
$class = self::get_search_wrapper('\phpbb\search\fulltext_native');
|
||||
$config['fulltext_native_min_chars'] = 2;
|
||||
$config['fulltext_native_max_chars'] = 14;
|
||||
$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
|
||||
$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user, $phpbb_dispatcher);
|
||||
}
|
||||
|
||||
public function keywords()
|
||||
|
@ -37,8 +37,9 @@ class phpbb_search_postgres_test extends phpbb_search_common_test_case
|
||||
$config['fulltext_postgres_max_word_len'] = 254;
|
||||
|
||||
$this->db = $this->new_dbal();
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
$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);
|
||||
$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user, $phpbb_dispatcher);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user