aboutsummaryrefslogtreecommitdiffstats
path: root/tests/email
diff options
context:
space:
mode:
authorFrançois-Xavier de Guillebon <fdn2@3ds.com>2018-01-16 12:46:48 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-05-09 21:30:12 +0200
commit40e61e4d1ec3da2ea48efda401b0044f2aff6071 (patch)
treeca1f7990ca15f09d0eb6c76ba60b2551304e94ec /tests/email
parentff35f65064bebd44837802765937227ab0f59b37 (diff)
downloadforums-40e61e4d1ec3da2ea48efda401b0044f2aff6071.tar
forums-40e61e4d1ec3da2ea48efda401b0044f2aff6071.tar.gz
forums-40e61e4d1ec3da2ea48efda401b0044f2aff6071.tar.bz2
forums-40e61e4d1ec3da2ea48efda401b0044f2aff6071.tar.xz
forums-40e61e4d1ec3da2ea48efda401b0044f2aff6071.zip
[ticket/15508] Remove call to getEnvironment() from parser
PHPBB3-15508
Diffstat (limited to 'tests/email')
-rw-r--r--tests/email/email_parsing_test.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/email/email_parsing_test.php b/tests/email/email_parsing_test.php
index 8fdfe3035e..182517a039 100644
--- a/tests/email/email_parsing_test.php
+++ b/tests/email/email_parsing_test.php
@@ -67,13 +67,6 @@ class phpbb_email_parsing_test extends phpbb_test_case
$phpbb_container->set('ext.manager', $extension_manager);
$context = new \phpbb\template\context();
- $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);
- $twig_extensions_collection->add('template.twig.extensions.phpbb');
- $phpbb_container->set('template.twig.extensions.collection', $twig_extensions_collection);
-
$twig = new \phpbb\template\twig\environment(
$config,
$filesystem,
@@ -89,6 +82,13 @@ class phpbb_email_parsing_test extends phpbb_test_case
'autoescape' => false,
)
);
+ $twig_extension = new \phpbb\template\twig\extension($context, $twig, $lang);
+ $phpbb_container->set('template.twig.extensions.phpbb', $twig_extension);
+
+ $twig_extensions_collection = new \phpbb\di\service_collection($phpbb_container);
+ $twig_extensions_collection->add('template.twig.extensions.phpbb');
+ $phpbb_container->set('template.twig.extensions.collection', $twig_extensions_collection);
+
$twig->addExtension($twig_extension);
$phpbb_container->set('template.twig.lexer', new \phpbb\template\twig\lexer($twig));