[ticket/11482] Unit tests for advanced DEFINE

Unit tests for advanced DEFINE and ENDDEFINE

PHPBB3-11482
This commit is contained in:
Vjacheslav Trushkin 2013-04-10 09:00:34 +03:00
parent 29a5db25ec
commit 5e8d92b0a8
5 changed files with 39 additions and 2 deletions

View file

@ -132,6 +132,20 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(), array(),
"xyz\nabc\nabc\nbar\nbar\nabc", "xyz\nabc\nabc\nbar\nbar\nabc",
), ),
array(
'define_advanced.html',
array(),
array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
array(),
"abc\nzxc\ncde\nbcd",
),
array(
'define_unclosed.html',
array(),
array(),
array(),
"test",
),
array( array(
'expressions.html', 'expressions.html',
array(), array(),

View file

@ -7,5 +7,3 @@
{$VALUE} {$VALUE}
<!-- UNDEFINE $VALUE --> <!-- UNDEFINE $VALUE -->
{$VALUE} {$VALUE}
<!-- DEFINE $VALUE -->

View file

@ -0,0 +1,12 @@
<!-- DEFINE $VALUE -->
abc
<!-- ENDDEFINE -->
{$VALUE}
<!-- DEFINE $VALUE1 -->
bcd
<!-- ENDDEFINE -->
<!-- DEFINE $VALUE2 -->
cde
<!-- ENDDEFINE -->
<!-- INCLUDE define_include2.html -->
{$INCLUDED_VALUE3}

View file

@ -0,0 +1,11 @@
<!-- DEFINE $INCLUDED_VALUE1 -->
zxc
<!-- ENDDEFINE -->
<!-- DEFINE $INCLUDED_VALUE2 -->
qwe
<!-- ENDDEFINE -->
{$INCLUDED_VALUE1}
<!-- DEFINE $INCLUDED_VALUE3 -->
{$VALUE2}
{$VALUE1}
<!-- ENDDEFINE -->

View file

@ -0,0 +1,2 @@
<!-- DEFINE $VALUE -->
test