aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/template/template_test.php22
-rw-r--r--tests/template/templates/if.html8
2 files changed, 26 insertions, 4 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 4970ce0363..b7c3a08512 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -46,28 +46,42 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(),
array(),
array(),
- '03',
+ '03!false',
),
array(
'if.html',
array('S_VALUE' => true),
array(),
array(),
- '1',
+ '1!false',
),
array(
'if.html',
array('S_VALUE' => true, 'S_OTHER_VALUE' => true),
array(),
array(),
- '1',
+ '1!false',
),
array(
'if.html',
array('S_VALUE' => false, 'S_OTHER_VALUE' => true),
array(),
array(),
- '2',
+ '2!false',
+ ),
+ array(
+ 'if.html',
+ array('S_TEST' => false),
+ array(),
+ array(),
+ '03false',
+ ),
+ array(
+ 'if.html',
+ array('S_TEST' => 0),
+ array(),
+ array(),
+ '03!false',
),
array(
'loop.html',
diff --git a/tests/template/templates/if.html b/tests/template/templates/if.html
index eed431019e..c010aff7fa 100644
--- a/tests/template/templates/if.html
+++ b/tests/template/templates/if.html
@@ -9,3 +9,11 @@
<!-- IF S_VALUE and S_OTHER_VALUE and (S_VALUE > S_OTHER_VALUE) -->
04
<!-- ENDIF -->
+
+<!-- IF S_TEST === false -->
+false
+<!-- ENDIF -->
+
+<!-- IF S_TEST !== false -->
+!false
+<!-- ENDIF -->