aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/template_test_case.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/template_test_case.php')
-rw-r--r--tests/template/template_test_case.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index 3e2cd5a387..6d87e5ebc0 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -33,7 +33,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
}
catch (Exception $exception)
{
- // reset output buffering even when an error occured
+ // reset output buffering even when an error occurred
// PHPUnit turns trigger_error into exceptions as well
ob_end_clean();
throw $exception;
@@ -84,7 +84,10 @@ class phpbb_template_template_test_case extends phpbb_test_case
protected function tearDown()
{
- $this->template->clear_cache();
+ if ($this->template)
+ {
+ $this->template->clear_cache();
+ }
}
protected function run_template($file, array $vars, array $block_vars, array $destroy, $expected, $lang_vars = array())