diff options
author | javiexin <javiexin@gmail.com> | 2017-01-08 01:35:18 +0100 |
---|---|---|
committer | javiexin <javiexin@gmail.com> | 2017-01-08 01:35:18 +0100 |
commit | 988865fd0a1d213a441777b3c613265365fe651a (patch) | |
tree | 7b81c0ff8b8b75f97fd3c3e745ead2bdf795c34e /tests | |
parent | 7f8dd6b007393482b7f9e3316a6756d0c3953e11 (diff) | |
download | forums-988865fd0a1d213a441777b3c613265365fe651a.tar forums-988865fd0a1d213a441777b3c613265365fe651a.tar.gz forums-988865fd0a1d213a441777b3c613265365fe651a.tar.bz2 forums-988865fd0a1d213a441777b3c613265365fe651a.tar.xz forums-988865fd0a1d213a441777b3c613265365fe651a.zip |
[ticket/14950] Add possibility to delete a template block
Adds a new mode to alter_block_array to allow for the deletion of
a certain block of template variables. The selection method is the
same as for the other modes for alter_block_array. The passed in
vararray is ignored, and an out of bounds index is considered an error.
Added tests for the new function, fixed.
PHPBB3-14950
Diffstat (limited to 'tests')
-rw-r--r-- | tests/template/template_test.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 3bc2f66ef0..c03da6e646 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -636,7 +636,7 @@ EOT $this->template->alter_block_array('outer', array(), 1, 'delete'); - $expect = 'outer - 0 - one[outer|2]outer - 1 - three[outer|3]middle - 0 - 3A[middle|3]middle - 1 - 3B[middle|3]middle - 2 - 3C[middle|3]'; + $expect = 'outer - 0 - one[outer|2]outer - 1 - three[outer|2]middle - 0 - 3A[middle|3]middle - 1 - 3B[middle|3]middle - 2 - 3C[middle|3]'; $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Deleting by index at top level'); $this->template->alter_block_array('outer.middle', array(), 1, 'delete'); |