From 720d07c9b3942a103ceedc1996fb11e13c1bc2f0 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 10 May 2012 03:28:54 -0400 Subject: [PATCH] [ticket/10882] Add test for an ENDIF without IF. PHPBB3-10882 --- tests/template/invalid_constructs_test.php | 12 ++++++++++++ .../template/templates/invalid/endif_without_if.html | 1 + .../templates/invalid/output/endif_without_if.html | 1 + 3 files changed, 14 insertions(+) create mode 100644 tests/template/templates/invalid/endif_without_if.html create mode 100644 tests/template/templates/invalid/output/endif_without_if.html diff --git a/tests/template/invalid_constructs_test.php b/tests/template/invalid_constructs_test.php index 08fb5d4289..8d54df5014 100644 --- a/tests/template/invalid_constructs_test.php +++ b/tests/template/invalid_constructs_test.php @@ -22,6 +22,18 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array(), 'invalid/output/unknown_tag.html', ), + /* + * Produces a parse error which is fatal, therefore + * destroying the test suite. + array( + 'ENDIF without IF', + 'invalid/endif_without_if.html', + array(), + array(), + array(), + 'invalid/output/endif_without_if.html', + ), + */ ); } diff --git a/tests/template/templates/invalid/endif_without_if.html b/tests/template/templates/invalid/endif_without_if.html new file mode 100644 index 0000000000..e371ffd150 --- /dev/null +++ b/tests/template/templates/invalid/endif_without_if.html @@ -0,0 +1 @@ + diff --git a/tests/template/templates/invalid/output/endif_without_if.html b/tests/template/templates/invalid/output/endif_without_if.html new file mode 100644 index 0000000000..5f2239c964 --- /dev/null +++ b/tests/template/templates/invalid/output/endif_without_if.html @@ -0,0 +1 @@ +Parse error (fatal, destroys php runtime).