aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/exception/MWExceptionTest.php
diff options
context:
space:
mode:
authoraddshore <addshorewiki@gmail.com>2014-02-24 21:21:09 +0100
committeraddshore <addshorewiki@gmail.com>2014-02-24 21:21:09 +0100
commit7a56bf81683e5ce5e2b5adeed0937ab114370d8b (patch)
tree73027ec2941306630a72d1d514a2b3eae69d6895 /tests/phpunit/includes/exception/MWExceptionTest.php
parent557af130868dacfb981e916baa4dcbcb866e16a1 (diff)
downloadmediawikicore-7a56bf81683e5ce5e2b5adeed0937ab114370d8b.tar.gz
mediawikicore-7a56bf81683e5ce5e2b5adeed0937ab114370d8b.zip
Add scope to Exception class methods
Change-Id: I0097aa9a6d9c178c85706b90484f7a68d3ddbc8b
Diffstat (limited to 'tests/phpunit/includes/exception/MWExceptionTest.php')
-rw-r--r--tests/phpunit/includes/exception/MWExceptionTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/phpunit/includes/exception/MWExceptionTest.php b/tests/phpunit/includes/exception/MWExceptionTest.php
index 5f001c7ea68a..f1ddc17e4c4b 100644
--- a/tests/phpunit/includes/exception/MWExceptionTest.php
+++ b/tests/phpunit/includes/exception/MWExceptionTest.php
@@ -11,7 +11,7 @@ class MWExceptionTest extends MediaWikiTestCase {
/**
* @expectedException MWException
*/
- function testMwexceptionThrowing() {
+ public function testMwexceptionThrowing() {
throw new MWException();
}
@@ -21,7 +21,7 @@ class MWExceptionTest extends MediaWikiTestCase {
* @covers MWExceptionHandler::jsonSerializeException
* @dataProvider provideExceptionClasses
*/
- function testJsonSerializeExceptions( $exception_class ) {
+ public function testJsonSerializeExceptions( $exception_class ) {
$json = MWExceptionHandler::jsonSerializeException(
new $exception_class()
);
@@ -29,7 +29,7 @@ class MWExceptionTest extends MediaWikiTestCase {
"The $exception_class exception should be JSON serializable, got false." );
}
- function provideExceptionClasses() {
+ public function provideExceptionClasses() {
return array(
array( 'Exception' ),
array( 'MWException' ),
@@ -46,7 +46,7 @@ class MWExceptionTest extends MediaWikiTestCase {
* @param $key String Name of the key to validate in the serialized JSON
* @dataProvider provideJsonSerializedKeys
*/
- function testJsonserializeexceptionKeys( $expectedKeyType, $exClass, $key ) {
+ public function testJsonserializeexceptionKeys( $expectedKeyType, $exClass, $key ) {
# Make sure we log a backtrace:
$this->setMwGlobals( array( 'wgLogExceptionBacktrace' => true ) );
@@ -66,7 +66,7 @@ class MWExceptionTest extends MediaWikiTestCase {
/**
* Returns test cases: exception class, key name, gettype()
*/
- function provideJsonSerializedKeys() {
+ public function provideJsonSerializedKeys() {
$testCases = array();
foreach ( array( 'Exception', 'MWException' ) as $exClass ) {
$exTests = array(
@@ -89,7 +89,7 @@ class MWExceptionTest extends MediaWikiTestCase {
*
* @covers MWExceptionHandler::jsonSerializeException
*/
- function testJsonserializeexceptionBacktracingEnabled() {
+ public function testJsonserializeexceptionBacktracingEnabled() {
$this->setMwGlobals( array( 'wgLogExceptionBacktrace' => true ) );
$json = json_decode(
MWExceptionHandler::jsonSerializeException( new Exception() )
@@ -103,7 +103,7 @@ class MWExceptionTest extends MediaWikiTestCase {
*
* @covers MWExceptionHandler::jsonSerializeException
*/
- function testJsonserializeexceptionBacktracingDisabled() {
+ public function testJsonserializeexceptionBacktracingDisabled() {
$this->setMwGlobals( array( 'wgLogExceptionBacktrace' => false ) );
$json = json_decode(
MWExceptionHandler::jsonSerializeException( new Exception() )