aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormrgoldy <gijsmartens1@gmail.com>2018-12-10 00:10:27 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-09-25 20:39:04 +0200
commit133dfd0a84ce258fadab5f48de45684869b14800 (patch)
treecb9acf47f24f975850ede6c9941a41524c201627 /tests
parenteee00652e7b608967a2ec5ee8fd165c2760be145 (diff)
downloadforums-133dfd0a84ce258fadab5f48de45684869b14800.tar
forums-133dfd0a84ce258fadab5f48de45684869b14800.tar.gz
forums-133dfd0a84ce258fadab5f48de45684869b14800.tar.bz2
forums-133dfd0a84ce258fadab5f48de45684869b14800.tar.xz
forums-133dfd0a84ce258fadab5f48de45684869b14800.zip
[ticket/15905] Try it without auth
PHPBB3-15905
Diffstat (limited to 'tests')
-rw-r--r--tests/controller/common_helper_route.php6
-rw-r--r--tests/email/email_parsing_test.php3
-rw-r--r--tests/extension/metadata_manager_test.php4
-rw-r--r--tests/template/template_allfolder_test.php4
-rw-r--r--tests/template/template_events_test.php4
-rw-r--r--tests/template/template_includecss_test.php4
-rw-r--r--tests/template/template_test_case.php4
-rw-r--r--tests/template/template_test_case_with_tree.php4
8 files changed, 9 insertions, 24 deletions
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php
index 3d3578ab43..447c10d10e 100644
--- a/tests/controller/common_helper_route.php
+++ b/tests/controller/common_helper_route.php
@@ -74,9 +74,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
protected function generate_route_objects()
{
- global $request, $phpbb_root_path, $phpEx;
-
- $auth = $this->getMock('\phpbb\auth\auth');
+ global $request;
$this->request = new phpbb_mock_request();
$this->request->overwrite('SCRIPT_NAME', $this->get_uri(), \phpbb\request\request_interface::SERVER);
@@ -124,7 +122,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
'autoescape' => false,
)
);
- $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)));
+ $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)));
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
$this->extension_manager = new phpbb_mock_extension_manager(
diff --git a/tests/email/email_parsing_test.php b/tests/email/email_parsing_test.php
index 1b5c6aaa8c..2e083a6056 100644
--- a/tests/email/email_parsing_test.php
+++ b/tests/email/email_parsing_test.php
@@ -66,9 +66,8 @@ class phpbb_email_parsing_test extends phpbb_test_case
);
$phpbb_container->set('ext.manager', $extension_manager);
- $auth = $this->getMock('\phpbb\auth\auth');
$context = new \phpbb\template\context();
- $twig_extension = new \phpbb\template\twig\extension($auth, $context, $lang);
+ $twig_extension = new \phpbb\template\twig\extension($context, $lang);
$phpbb_container->set('template.twig.extensions.phpbb', $twig_extension);
$twig_extensions_collection = new \phpbb\di\service_collection($phpbb_container);
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index f2f5dc669e..a2f0542979 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -36,8 +36,6 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
{
parent::setUp();
- $auth = $this->getMock('\phpbb\auth\auth');
-
$this->config = new \phpbb\config\config(array(
'version' => '3.1.0',
));
@@ -113,7 +111,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$lang = new \phpbb\language\language($lang_loader);
$this->user = new \phpbb\user($lang, '\phpbb\datetime');
- $this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)));
+ $this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)));
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
}
diff --git a/tests/template/template_allfolder_test.php b/tests/template/template_allfolder_test.php
index 60891a3668..a9a8ecc287 100644
--- a/tests/template/template_allfolder_test.php
+++ b/tests/template/template_allfolder_test.php
@@ -26,8 +26,6 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case
{
global $phpbb_root_path, $phpEx;
- $auth = $this->getMock('\phpbb\auth\auth');
-
$defaults = $this->config_defaults();
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
@@ -77,7 +75,7 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case
'autoescape' => false,
)
);
- $this->template = new \phpbb\template\twig\twig($path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)), $this->extension_manager);
+ $this->template = new \phpbb\template\twig\twig($path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)), $this->extension_manager);
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
$this->template_path = $this->test_path . '/templates';
diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php
index e879979803..9243390937 100644
--- a/tests/template/template_events_test.php
+++ b/tests/template/template_events_test.php
@@ -131,8 +131,6 @@ Zeta test event in all',
{
global $phpbb_root_path, $phpEx, $user;
- $auth = $this->getMock('\phpbb\auth\auth');
-
$defaults = $this->config_defaults();
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
@@ -171,7 +169,7 @@ Zeta test event in all',
'autoescape' => false,
)
);
- $this->template = new \phpbb\template\twig\twig($path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)), $this->extension_manager);
+ $this->template = new \phpbb\template\twig\twig($path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)), $this->extension_manager);
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
$this->template->set_custom_style(((!empty($style_names)) ? $style_names : 'silver'), array($this->template_path));
diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php
index 0f26c095a7..5f9875a556 100644
--- a/tests/template/template_includecss_test.php
+++ b/tests/template/template_includecss_test.php
@@ -25,8 +25,6 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
{
global $phpbb_root_path, $phpEx, $user;
- $auth = $this->getMock('\phpbb\auth\auth');
-
$defaults = $this->config_defaults();
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
@@ -70,7 +68,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
$twig,
$cache_path,
$this->user,
- array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)),
+ array(new \phpbb\template\twig\extension($context, $twig, $this->user)),
new phpbb_mock_extension_manager(
dirname(__FILE__) . '/',
array(
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index f495c93f9d..0389088ec8 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -73,8 +73,6 @@ class phpbb_template_template_test_case extends phpbb_test_case
{
global $phpbb_root_path, $phpEx;
- $auth = $this->getMock('\phpbb\auth\auth');
-
$defaults = $this->config_defaults();
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
@@ -115,7 +113,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
'autoescape' => false,
)
);
- $this->template = new phpbb\template\twig\twig($path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)));
+ $this->template = new phpbb\template\twig\twig($path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)));
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
$this->template->set_custom_style('tests', $this->template_path);
}
diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php
index 756bedb042..c0238b6f03 100644
--- a/tests/template/template_test_case_with_tree.php
+++ b/tests/template/template_test_case_with_tree.php
@@ -19,8 +19,6 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
{
global $phpbb_root_path, $phpEx, $user;
- $auth = $this->getMock('\phpbb\auth\auth');
-
$defaults = $this->config_defaults();
$config = new \phpbb\config\config(array_merge($defaults, $new_config));
@@ -58,7 +56,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
'autoescape' => false,
)
);
- $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)));
+ $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)));
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
$this->template->set_custom_style('tests', array($this->template_path, $this->parent_template_path));
}