diff options
author | Igor Wiedler <igor@wiedler.ch> | 2011-09-05 08:51:17 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2011-09-05 08:51:17 +0200 |
commit | 6f9df6199cee4a845a1cc654ebb92cfc67328ec7 (patch) | |
tree | 6d3d44828f81a2ab4c161f103952b74caf6ab27d /tests | |
parent | 93b892d24a3389a677737995fefc3a3107ca1934 (diff) | |
parent | 511f2e04350e08ba1412a92e86427ed97775e1f4 (diff) | |
download | forums-6f9df6199cee4a845a1cc654ebb92cfc67328ec7.tar forums-6f9df6199cee4a845a1cc654ebb92cfc67328ec7.tar.gz forums-6f9df6199cee4a845a1cc654ebb92cfc67328ec7.tar.bz2 forums-6f9df6199cee4a845a1cc654ebb92cfc67328ec7.tar.xz forums-6f9df6199cee4a845a1cc654ebb92cfc67328ec7.zip |
Merge remote-tracking branch 'p/ticket/10355' into develop
* p/ticket/10355:
[ticket/10355] Correctly end output buffering in template tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/template/template_test_case.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index e475e4012f..7cf995f194 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -21,8 +21,22 @@ class phpbb_template_template_test_case extends phpbb_test_case protected function display($handle) { ob_start(); - $this->assertTrue($this->template->display($handle)); - return self::trim_template_result(ob_get_clean()); + + try + { + $this->assertTrue($this->template->display($handle, false)); + } + catch (Exception $exception) + { + // reset output buffering even when an error occured + // PHPUnit turns trigger_error into exceptions as well + ob_end_clean(); + throw $exception; + } + + $result = self::trim_template_result(ob_get_clean()); + + return $result; } protected static function trim_template_result($result) |