aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_test_case.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-04-03 10:47:07 +0200
committerIgor Wiedler <igor@wiedler.ch>2010-04-03 10:47:07 +0200
commite3ebdbd79baa31b64ab724a76c2b80e907f3b367 (patch)
tree3c0df579f7942984e80a800c144da64c6a6522cc /tests/test_framework/phpbb_test_case.php
parent3e5236dcd62f1d0b18cd3c92661a2287b5bbf2d6 (diff)
parent43774ef423d205250181c7413585ecd4d9ad6388 (diff)
downloadforums-e3ebdbd79baa31b64ab724a76c2b80e907f3b367.tar
forums-e3ebdbd79baa31b64ab724a76c2b80e907f3b367.tar.gz
forums-e3ebdbd79baa31b64ab724a76c2b80e907f3b367.tar.bz2
forums-e3ebdbd79baa31b64ab724a76c2b80e907f3b367.tar.xz
forums-e3ebdbd79baa31b64ab724a76c2b80e907f3b367.zip
Merge branch 'develop-olympus' into git-tools
Diffstat (limited to 'tests/test_framework/phpbb_test_case.php')
-rw-r--r--tests/test_framework/phpbb_test_case.php30
1 files changed, 10 insertions, 20 deletions
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php
index 3cf2a9d442..af867b29ff 100644
--- a/tests/test_framework/phpbb_test_case.php
+++ b/tests/test_framework/phpbb_test_case.php
@@ -9,29 +9,19 @@
class phpbb_test_case extends PHPUnit_Framework_TestCase
{
- protected $expectedTriggerError = false;
+ protected $test_case_helpers;
- public function setExpectedTriggerError($errno, $message = '')
+ public function init_test_case_helpers()
{
- $exceptionName = '';
- switch ($errno)
+ if (!$this->test_case_helpers)
{
- case E_NOTICE:
- case E_STRICT:
- PHPUnit_Framework_Error_Notice::$enabled = true;
- $exceptionName = 'PHPUnit_Framework_Error_Notice';
- break;
-
- case E_WARNING:
- PHPUnit_Framework_Error_Warning::$enabled = true;
- $exceptionName = 'PHPUnit_Framework_Error_Warning';
- break;
-
- default:
- $exceptionName = 'PHPUnit_Framework_Error';
- break;
+ $this->test_case_helpers = new phpbb_test_case_helpers($this);
}
- $this->expectedTriggerError = true;
- $this->setExpectedException($exceptionName, (string) $message, $errno);
+ }
+
+ public function setExpectedTriggerError($errno, $message = '')
+ {
+ $this->init_test_case_helpers();
+ $this->test_case_helpers->setExpectedTriggerError($errno, $message);
}
}