mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 04:04:12 +02:00
[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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user