From ee846c461c6f0d4ec02dcefa6c82090587bc7012 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 22 Oct 2010 19:11:18 +0200 Subject: [task/mssql-db-tests] Use a simple getter for test case helpers. Calling initialisation to then use the member directly seems more complicated than just having a method that returns the instance or creates it if necessary. PHPBB3-9868 --- tests/test_framework/phpbb_test_case.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test_framework/phpbb_test_case.php') diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php index af867b29ff..fe90d321dc 100644 --- a/tests/test_framework/phpbb_test_case.php +++ b/tests/test_framework/phpbb_test_case.php @@ -11,17 +11,18 @@ class phpbb_test_case extends PHPUnit_Framework_TestCase { protected $test_case_helpers; - public function init_test_case_helpers() + public function get_test_case_helpers() { if (!$this->test_case_helpers) { $this->test_case_helpers = new phpbb_test_case_helpers($this); } + + return $this->test_case_helpers; } public function setExpectedTriggerError($errno, $message = '') { - $this->init_test_case_helpers(); - $this->test_case_helpers->setExpectedTriggerError($errno, $message); + $this->get_test_case_helpers()->setExpectedTriggerError($errno, $message); } } -- cgit v1.2.1