aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/template_compile_test.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-11-06 11:11:27 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-06 11:11:27 -0500
commit87ea50948ea53c0d1beab5b44badebeae4292d1a (patch)
treedbc99fde4dfc62b84bae60c7e4ab5c02ddbe8a3c /tests/template/template_compile_test.php
parent5b48df41685da785b082612318ebe7a8012c4149 (diff)
parent44ff9d020fd218cbdb2f07a0d7f85a630367e3c2 (diff)
downloadforums-87ea50948ea53c0d1beab5b44badebeae4292d1a.tar
forums-87ea50948ea53c0d1beab5b44badebeae4292d1a.tar.gz
forums-87ea50948ea53c0d1beab5b44badebeae4292d1a.tar.bz2
forums-87ea50948ea53c0d1beab5b44badebeae4292d1a.tar.xz
forums-87ea50948ea53c0d1beab5b44badebeae4292d1a.zip
Merge remote-tracking branch 'upstream/develop' into feature/prune-users
* upstream/develop: (2171 commits) [ticket/11164] Update composer.phar [ticket/10933] Use inheritDoc, eliminate copy pasted docblocks. [ticket/10933] Dependency inject template context. [ticket/10933] Expanded prose documentation for phpbb_extension_provider. [ticket/10933] Specify empty template path for absolute includephp test. [ticket/10933] Useful documentation for template locate function [ticket/10933] Typo fixes [ticket/10933] Initialize template context when template is constructed. [ticket/11099] Mark acp_ban::display_ban_options() as static. [ticket/11158] Require acl_u_sig for ucp signature module. [ticket/11158] Revert old fix in PHPBB3-10186. [ticket/11159] static public is the currently approved order. [ticket/11157] static public is the currently approved order. [ticket/11157] Fix remaining captcha spam. [ticket/11157] get_captcha_types is an instance method. [ticket/11156] Delete "Misc" tab of forum based permissions + move items [ticket/10848] Move include up. [ticket/11014] Fix old pagination assignment [ticket/11018] Fix several paginations in ACP [ticket/11014] Fix IF statements for new template pagination ... Conflicts: phpBB/includes/functions_user.php
Diffstat (limited to 'tests/template/template_compile_test.php')
-rw-r--r--tests/template/template_compile_test.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/template/template_compile_test.php b/tests/template/template_compile_test.php
new file mode 100644
index 0000000000..0cfcd6ceb5
--- /dev/null
+++ b/tests/template/template_compile_test.php
@@ -0,0 +1,31 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_template_template_compile_test extends phpbb_test_case
+{
+ private $template_compile;
+ private $template_path;
+
+ protected function setUp()
+ {
+ $this->template_compile = new phpbb_template_compile(false, null, '');
+ $this->template_path = dirname(__FILE__) . '/templates';
+ }
+
+ public function test_in_phpbb()
+ {
+ $output = $this->template_compile->compile_file($this->template_path . '/trivial.html');
+ $this->assertTrue(strlen($output) > 0);
+ $statements = explode(';', $output);
+ $first_statement = $statements[0];
+ $this->assertTrue(!!preg_match('#if.*defined.*IN_PHPBB.*exit#', $first_statement));
+ }
+}