aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-12 11:11:28 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-12 11:13:06 +0200
commitb3a758a43b3b8ef9dbb3b0a66b9c708639cdd6d9 (patch)
tree850df8b5aa6bd9204618dc63aa6b97a3ea569c68
parent09804bbae80c36989aba6631afca0dbdd3781f75 (diff)
downloadforums-b3a758a43b3b8ef9dbb3b0a66b9c708639cdd6d9.tar
forums-b3a758a43b3b8ef9dbb3b0a66b9c708639cdd6d9.tar.gz
forums-b3a758a43b3b8ef9dbb3b0a66b9c708639cdd6d9.tar.bz2
forums-b3a758a43b3b8ef9dbb3b0a66b9c708639cdd6d9.tar.xz
forums-b3a758a43b3b8ef9dbb3b0a66b9c708639cdd6d9.zip
[ticket/12382] Add template test for subloops inside includes
PHPBB3-12382
-rw-r--r--tests/template/template_test.php10
-rw-r--r--tests/template/templates/loop_nested_include.html4
-rw-r--r--tests/template/templates/loop_nested_include1.html5
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 74baa3d5b6..c012f6c855 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -320,6 +320,16 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(),
"barbarbar1bar1",
),
+ array(
+ 'loop_nested_include.html',
+ array(),
+ array(
+ 'test_loop' => array(array('foo' => 'bar'), array('foo' => 'bar1')),
+ 'test_loop.inner' => array(array('myinner' => 'works')),
+ ),
+ array(),
+ "[bar|[bar|]][bar1|[bar1|[bar1|works]]]",
+ ),
/* Does not pass with the current implementation.
array(
'loop_reuse.html',
diff --git a/tests/template/templates/loop_nested_include.html b/tests/template/templates/loop_nested_include.html
new file mode 100644
index 0000000000..eaad46cc5b
--- /dev/null
+++ b/tests/template/templates/loop_nested_include.html
@@ -0,0 +1,4 @@
+<!-- BEGIN test_loop -->
+[{test_loop.foo}
+ |<!-- INCLUDE loop_nested_include1.html -->]
+<!-- END test_loop -->
diff --git a/tests/template/templates/loop_nested_include1.html b/tests/template/templates/loop_nested_include1.html
new file mode 100644
index 0000000000..0f1a180b4d
--- /dev/null
+++ b/tests/template/templates/loop_nested_include1.html
@@ -0,0 +1,5 @@
+[{test_loop.foo}|
+<!-- BEGIN inner -->
+[{test_loop.foo}|
+{test_loop.inner.myinner}]
+<!-- END inner -->]