aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template
diff options
context:
space:
mode:
authormrgoldy <gijsmartens1@gmail.com>2018-12-09 23:52:50 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-09-25 20:07:09 +0200
commit7989f3f71fd665aa743d947c7487d41c6f0a33d4 (patch)
tree4d2fe00e8c520c13400c193c994bb26070ae8044 /tests/template
parent012fe1887963adecc30fa46b7c7069a29600666d (diff)
downloadforums-7989f3f71fd665aa743d947c7487d41c6f0a33d4.tar
forums-7989f3f71fd665aa743d947c7487d41c6f0a33d4.tar.gz
forums-7989f3f71fd665aa743d947c7487d41c6f0a33d4.tar.bz2
forums-7989f3f71fd665aa743d947c7487d41c6f0a33d4.tar.xz
forums-7989f3f71fd665aa743d947c7487d41c6f0a33d4.zip
[ticket/15905] Try with existing phpbb extension
PHPBB3-15905
Diffstat (limited to 'tests/template')
-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
5 files changed, 15 insertions, 5 deletions
diff --git a/tests/template/template_allfolder_test.php b/tests/template/template_allfolder_test.php
index a9a8ecc287..60891a3668 100644
--- a/tests/template/template_allfolder_test.php
+++ b/tests/template/template_allfolder_test.php
@@ -26,6 +26,8 @@ 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);
@@ -75,7 +77,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($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($auth, $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 9243390937..e879979803 100644
--- a/tests/template/template_events_test.php
+++ b/tests/template/template_events_test.php
@@ -131,6 +131,8 @@ 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));
@@ -169,7 +171,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($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($auth, $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 5f9875a556..0f26c095a7 100644
--- a/tests/template/template_includecss_test.php
+++ b/tests/template/template_includecss_test.php
@@ -25,6 +25,8 @@ 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));
@@ -68,7 +70,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
$twig,
$cache_path,
$this->user,
- array(new \phpbb\template\twig\extension($context, $twig, $this->user)),
+ array(new \phpbb\template\twig\extension($auth, $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 0389088ec8..f495c93f9d 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -73,6 +73,8 @@ 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);
@@ -113,7 +115,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($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($auth, $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 c0238b6f03..756bedb042 100644
--- a/tests/template/template_test_case_with_tree.php
+++ b/tests/template/template_test_case_with_tree.php
@@ -19,6 +19,8 @@ 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));
@@ -56,7 +58,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($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($auth, $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));
}