diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-08 15:18:40 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-07-08 15:21:27 -0500 |
commit | 47ec38c011f3d3d86dacdc3126fc36cdec8b1072 (patch) | |
tree | d1cf3a46bbbe3858ca91efe91281bad7798d2dd5 | |
parent | 70a553e0b5471c32469961be40e408bd544b670f (diff) | |
download | forums-47ec38c011f3d3d86dacdc3126fc36cdec8b1072.tar forums-47ec38c011f3d3d86dacdc3126fc36cdec8b1072.tar.gz forums-47ec38c011f3d3d86dacdc3126fc36cdec8b1072.tar.bz2 forums-47ec38c011f3d3d86dacdc3126fc36cdec8b1072.tar.xz forums-47ec38c011f3d3d86dacdc3126fc36cdec8b1072.zip |
[feature/twig] Add simple test to make sure Twig filters/tags are working
PHPBB3-11598
-rw-r--r-- | tests/template/template_test.php | 7 | ||||
-rw-r--r-- | tests/template/templates/twig.html | 6 | ||||
-rw-r--r-- | tests/template/templates/twig_parent.html | 7 |
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php index d99e91bae4..fedfeba33a 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -309,6 +309,13 @@ class phpbb_template_template_test extends phpbb_template_template_test_case "a\nb\nc\nd", ), */ + array( + 'twig.html', + array('VARIABLE' => 'FOObar',), + array(), + array(), + "13FOOBAR|foobar", + ), ); } diff --git a/tests/template/templates/twig.html b/tests/template/templates/twig.html new file mode 100644 index 0000000000..17b94ad8d4 --- /dev/null +++ b/tests/template/templates/twig.html @@ -0,0 +1,6 @@ +<!-- EXTENDS "twig_parent.html" --> + +<!-- BLOCK overwritten --> +3{VARIABLE|upper}|{VARIABLE|lower} +<!-- ENDBLOCK --> + diff --git a/tests/template/templates/twig_parent.html b/tests/template/templates/twig_parent.html new file mode 100644 index 0000000000..af528e0da4 --- /dev/null +++ b/tests/template/templates/twig_parent.html @@ -0,0 +1,7 @@ +<!-- BLOCK notoverwritten --> +1 +<!-- ENDBLOCK --> + +<!-- BLOCK overwritten --> +2 +<!-- ENDBLOCK -->
\ No newline at end of file |