aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-07-17 01:42:42 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-07-17 14:28:56 -0400
commitee203b46328f3a0e1297197e50b30487d1eab248 (patch)
tree16df8e531276211a708b111a8f8217482a35919d
parentbf34264f4f6c0fe6bbe49c6537c0f384f9fc495b (diff)
downloadforums-ee203b46328f3a0e1297197e50b30487d1eab248.tar
forums-ee203b46328f3a0e1297197e50b30487d1eab248.tar.gz
forums-ee203b46328f3a0e1297197e50b30487d1eab248.tar.bz2
forums-ee203b46328f3a0e1297197e50b30487d1eab248.tar.xz
forums-ee203b46328f3a0e1297197e50b30487d1eab248.zip
[feature/template-engine] Test template DEFINE statements across files
PHPBB3-9726
-rw-r--r--tests/template/template_test.php2
-rw-r--r--tests/template/templates/define.html3
-rw-r--r--tests/template/templates/define_include.html3
3 files changed, 7 insertions, 1 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index df3f927c22..2a5a53637d 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -130,7 +130,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(),
array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
array(),
- "xyz\nabc",
+ "xyz\nabc\nabc\nbar\nbar\nabc",
),
array(
'expressions.html',
diff --git a/tests/template/templates/define.html b/tests/template/templates/define.html
index 82237d21a3..4459fffbe0 100644
--- a/tests/template/templates/define.html
+++ b/tests/template/templates/define.html
@@ -2,6 +2,9 @@
{$VALUE}
<!-- DEFINE $VALUE = 'abc' -->
{$VALUE}
+<!-- INCLUDE define_include.html -->
+{$INCLUDED_VALUE}
+{$VALUE}
<!-- UNDEFINE $VALUE -->
{$VALUE}
<!-- DEFINE $VALUE -->
diff --git a/tests/template/templates/define_include.html b/tests/template/templates/define_include.html
new file mode 100644
index 0000000000..9c470c296a
--- /dev/null
+++ b/tests/template/templates/define_include.html
@@ -0,0 +1,3 @@
+{$VALUE}
+<!-- DEFINE $INCLUDED_VALUE = 'bar' -->
+{$INCLUDED_VALUE}