aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-07-05 10:29:24 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2013-07-05 10:29:24 -0500
commit1f4a717f9ec925d84b589547ce6c93a17ae863e9 (patch)
tree999be3e1d093ae53a70adfc04e89edea073b2526 /tests
parent81f0715b8ef89e3a03a285a0c0f4639351449e9a (diff)
downloadforums-1f4a717f9ec925d84b589547ce6c93a17ae863e9.tar
forums-1f4a717f9ec925d84b589547ce6c93a17ae863e9.tar.gz
forums-1f4a717f9ec925d84b589547ce6c93a17ae863e9.tar.bz2
forums-1f4a717f9ec925d84b589547ce6c93a17ae863e9.tar.xz
forums-1f4a717f9ec925d84b589547ce6c93a17ae863e9.zip
[feature/twig] Add template test for ===, !==
PHPBB3-11598
Diffstat (limited to 'tests')
-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 -->