From d8c1c7fb9aa2aa6d76c4e9769f1bb2c135909b23 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 16 Mar 2014 20:38:50 -0700 Subject: [ticket/7580] Add test for IF {VAR} is defined in templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://tracker.phpbb.com/browse/PHPBB3-7580 This test demonstrates that is possible to test if a variable exists and then use it if it does, similar to using isset(), but in template/twig syntax. {VAR} PHPBB3-7580 --- tests/template/template_test.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/template/template_test.php') diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 2b7be9746e..74baa3d5b6 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -90,6 +90,13 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array(), '03!false', ), + array( + 'if.html', + array('VALUE_TEST' => 'value'), + array(), + array(), + '03!falsevalue', + ), array( 'loop.html', array(), -- cgit v1.2.1