[ticket/701] Fix tests and move declarations to services file
B3P-701
This commit is contained in:
@@ -22,7 +22,7 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
global $auth, $cache, $config, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $template, $user;
|
||||
global $auth, $cache, $config, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $template, $user, $table_prefix;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
@@ -76,7 +76,7 @@ class phpbb_portal_fetch_posts_test extends \board3\portal\tests\testframework\d
|
||||
$this->auth = $auth;
|
||||
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
|
||||
$controller_helper->add_route('board3_portal_controller', 'portal');
|
||||
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, new phpbb_mock_request());
|
||||
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, $this->db, new phpbb_mock_request(), $table_prefix . 'styles');
|
||||
$this->user = $user;
|
||||
$template = $this->getMockBuilder('\phpbb\template')
|
||||
->setMethods(['set_filenames', 'destroy_block_vars', 'assign_block_vars', 'assign_display'])
|
||||
|
||||
@@ -39,7 +39,7 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $db, $portal_config, $phpbb_root_path, $phpEx;
|
||||
global $cache, $db, $portal_config, $phpbb_root_path, $phpEx, $table_prefix;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
@@ -56,7 +56,7 @@ class modules_manager_confirm_box_test extends \board3\portal\tests\testframewor
|
||||
|
||||
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
|
||||
$controller_helper->add_route('board3_portal_controller', 'portal');
|
||||
$modules_helper = new \board3\portal\includes\modules_helper($auth, $config, $controller_helper, $this->request);
|
||||
$modules_helper = new \board3\portal\includes\modules_helper($auth, $config, $controller_helper, $this->db, $this->request, $table_prefix . 'styles');
|
||||
|
||||
$this->portal_helper = new \board3\portal\includes\helper(array(
|
||||
new \board3\portal\modules\clock($config, null),
|
||||
|
||||
@@ -33,7 +33,7 @@ class board3_portal_modules_manager_test extends \board3\portal\tests\testframew
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
global $cache, $db, $phpbb_root_path, $phpEx;
|
||||
global $cache, $db, $phpbb_root_path, $phpEx, $table_prefix;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,7 +47,7 @@ class board3_portal_modules_manager_test extends \board3\portal\tests\testframew
|
||||
|
||||
$controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx);
|
||||
$controller_helper->add_route('board3_portal_controller', 'portal');
|
||||
$modules_helper = new \board3\portal\includes\modules_helper($auth, $config, $controller_helper, $request);
|
||||
$modules_helper = new \board3\portal\includes\modules_helper($auth, $config, $controller_helper, $this->db, $request, $table_prefix . 'styles');
|
||||
|
||||
$portal_helper = new \board3\portal\includes\helper(array(
|
||||
new \board3\portal\modules\clock($config, null),
|
||||
|
||||
Reference in New Issue
Block a user