1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/15540] Fix tests

PHPBB3-15540
This commit is contained in:
rubencm
2020-08-15 13:05:54 +00:00
parent ee9ea98a01
commit 1bc9cbefb2
17 changed files with 62 additions and 146 deletions

View File

@@ -78,16 +78,14 @@ class fulltext_mysql extends base implements search_backend_interface
* Constructor
* Creates a new \phpbb\search\backend\fulltext_mysql, which is used as a search backend
*
* @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $phpEx PHP file extension
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @param \phpbb\user $user User object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $phpEx PHP file extension
*/
public function __construct($auth, $config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
public function __construct($config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
{
$this->config = $config;
$this->db = $db;

View File

@@ -13,6 +13,11 @@
namespace phpbb\search\backend;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;
use phpbb\event\dispatcher_interface;
use phpbb\user;
/**
* phpBB's own db driven fulltext search, version 2
*/
@@ -83,41 +88,39 @@ class fulltext_native extends base implements search_backend_interface
/**
* Config object
* @var \phpbb\config\config
* @var config
*/
protected $config;
/**
* Database connection
* @var \phpbb\db\driver\driver_interface
* @var driver_interface
*/
protected $db;
/**
* phpBB event dispatcher object
* @var \phpbb\event\dispatcher_interface
* @var dispatcher_interface
*/
protected $phpbb_dispatcher;
/**
* User object
* @var \phpbb\user
* @var user
*/
protected $user;
/**
* Initialises the fulltext_native search backend with min/max word length
*
* @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure
* @param string $phpbb_root_path phpBB root path
* @param string $phpEx PHP file extension
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
*/
public function __construct($auth, $config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
* Initialises the fulltext_native search backend with min/max word length
*
* @param config $config Config object
* @param driver_interface $db Database object
* @param dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @param user $user User object
* @param string $phpbb_root_path phpBB root path
* @param string $phpEx PHP file extension
*/
public function __construct($config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
{
$this->config = $config;
$this->db = $db;

View File

@@ -13,6 +13,11 @@
namespace phpbb\search\backend;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;
use phpbb\event\dispatcher_interface;
use phpbb\user;
/**
* Fulltext search for PostgreSQL
*/
@@ -45,7 +50,7 @@ class fulltext_postgres extends base implements search_backend_interface
/**
* Config object
* @var \phpbb\config\config
* @var config
*/
protected $config;
@@ -57,13 +62,13 @@ class fulltext_postgres extends base implements search_backend_interface
/**
* phpBB event dispatcher object
* @var \phpbb\event\dispatcher_interface
* @var dispatcher_interface
*/
protected $phpbb_dispatcher;
/**
* User object
* @var \phpbb\user
* @var user
*/
protected $user;
@@ -91,16 +96,14 @@ class fulltext_postgres extends base implements search_backend_interface
* Constructor
* Creates a new \phpbb\search\backend\fulltext_postgres, which is used as a search backend
*
* @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
* @param config $config Config object
* @param driver_interface $db Database object
* @param dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @param user $user User object
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $phpEx PHP file extension
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface Database object
* @param \phpbb\user $user User object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
*/
public function __construct($auth, $config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
public function __construct($config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
{
$this->config = $config;
$this->db = $db;

View File

@@ -13,6 +13,11 @@
namespace phpbb\search\backend;
use phpbb\auth\auth;
use phpbb\config\config;
use phpbb\event\dispatcher_interface;
use phpbb\user;
define('SPHINX_MAX_MATCHES', 20000);
define('SPHINX_CONNECT_RETRIES', 3);
define('SPHINX_CONNECT_WAIT_TIME', 300);
@@ -67,13 +72,13 @@ class fulltext_sphinx implements search_backend_interface
/**
* Auth object
* @var \phpbb\auth\auth
* @var auth
*/
protected $auth;
/**
* Config object
* @var \phpbb\config\config
* @var config
*/
protected $config;
@@ -97,13 +102,13 @@ class fulltext_sphinx implements search_backend_interface
/**
* phpBB event dispatcher object
* @var \phpbb\event\dispatcher_interface
* @var dispatcher_interface
*/
protected $phpbb_dispatcher;
/**
* User object
* @var \phpbb\user
* @var user
*/
protected $user;
@@ -124,14 +129,14 @@ class fulltext_sphinx implements search_backend_interface
* Constructor
* Creates a new \phpbb\search\backend\fulltext_postgres, which is used as a search backend
*
* @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
* @param auth $auth Auth object
* @param config $config Config object
* @param $db
* @param dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @param user $user User object
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $phpEx PHP file extension
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface Database object
* @param \phpbb\user $user User object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @throws \Exception
*/
public function __construct($auth, $config, $db, $phpbb_dispatcher, $user, $phpbb_root_path, $phpEx)
{