MediaWiki  REL1_24
MWExceptionTest Class Reference
Inheritance diagram for MWExceptionTest:
Collaboration diagram for MWExceptionTest:

List of all members.

Public Member Functions

 provideTextUseOutputPage ()
 provideUseMessageCache ()
 testisCommandLine ($expected, $wgCommandLineMode)
 provideIsCommandLine MWException::isCommandLine
 testIsLogable ()
 MWException::isLoggable
 testJsonserializeexceptionBacktracingDisabled ()
 Given wgLogExceptionBacktrace is false then serialized exception SHOULD NOT have a backtrace.
 testJsonserializeexceptionBacktracingEnabled ()
 Given wgLogExceptionBacktrace is true then serialized exception SHOULD have a backtrace.
 testJsonserializeexceptionKeys ($expectedKeyType, $exClass, $key)
 Lame JSON schema validation.
 testJsonSerializeExceptions ($exception_class)
 Verify the exception classes are JSON serializabe.
 testMwexceptionThrowing ()
 MWException
 testRunHooks ($wgExceptionHooks, $name, $args, $expectedReturn)
 provideRunHooks MWException::runHooks
 testUseMessageCache ($expected, $wgLang)
 provideUseMessageCache MWException::useMessageCache
 testUseOutputPage ($expected, $wgLang, $wgFullyInitialised, $wgOut)
 provideTextUseOutputPage MWException::useOutputPage

Static Public Member Functions

static mockHook ()
 Used in conjunction with provideRunHooks and testRunHooks as a mock callback for a hook.
static provideExceptionClasses ()
static provideIsCommandLine ()
static provideJsonSerializedKeys ()
 Returns test cases: exception class, key name, gettype()
static provideRunHooks ()

Private Member Functions

 getMockLanguage ()

Detailed Description

Definition at line 9 of file MWExceptionTest.php.


Member Function Documentation

static MWExceptionTest::mockHook ( ) [static]

Used in conjunction with provideRunHooks and testRunHooks as a mock callback for a hook.

Definition at line 113 of file MWExceptionTest.php.

Definition at line 158 of file MWExceptionTest.php.

References array().

Definition at line 137 of file MWExceptionTest.php.

References array().

Returns test cases: exception class, key name, gettype()

Definition at line 195 of file MWExceptionTest.php.

References array(), and as.

static MWExceptionTest::provideRunHooks ( ) [static]

Definition at line 90 of file MWExceptionTest.php.

References array().

MWExceptionTest::testisCommandLine ( expected,
wgCommandLineMode 
)

provideIsCommandLine MWException::isCommandLine

Definition at line 129 of file MWExceptionTest.php.

References $e, $wgCommandLineMode, array(), and MediaWikiTestCase\setMwGlobals().

Given wgLogExceptionBacktrace is false then serialized exception SHOULD NOT have a backtrace.

MWExceptionHandler::jsonSerializeException

Definition at line 232 of file MWExceptionTest.php.

References array(), MWExceptionHandler\jsonSerializeException(), and MediaWikiTestCase\setMwGlobals().

Given wgLogExceptionBacktrace is true then serialized exception SHOULD have a backtrace.

MWExceptionHandler::jsonSerializeException

Definition at line 218 of file MWExceptionTest.php.

References array(), MWExceptionHandler\jsonSerializeException(), and MediaWikiTestCase\setMwGlobals().

MWExceptionTest::testJsonserializeexceptionKeys ( expectedKeyType,
exClass,
key 
)

Lame JSON schema validation.

MWExceptionHandler::jsonSerializeException

Parameters:
string$expectedKeyTypeType expected as returned by gettype()
string$exClassAn exception class (ie: Exception, MWException)
string$keyName of the key to validate in the serialized JSON provideJsonSerializedKeys

Definition at line 175 of file MWExceptionTest.php.

References $key, array(), MWExceptionHandler\jsonSerializeException(), and MediaWikiTestCase\setMwGlobals().

Verify the exception classes are JSON serializabe.

MWExceptionHandler::jsonSerializeException provideExceptionClasses

Definition at line 150 of file MWExceptionTest.php.

References MWExceptionHandler\jsonSerializeException().

MWExceptionTest::testRunHooks ( wgExceptionHooks,
name,
args,
expectedReturn 
)

provideRunHooks MWException::runHooks

Definition at line 82 of file MWExceptionTest.php.

References $e, $name, array(), and MediaWikiTestCase\setMwGlobals().

MWExceptionTest::testUseMessageCache ( expected,
wgLang 
)

provideUseMessageCache MWException::useMessageCache

Definition at line 55 of file MWExceptionTest.php.

References $e, $wgLang, array(), and MediaWikiTestCase\setMwGlobals().

MWExceptionTest::testUseOutputPage ( expected,
wgLang,
wgFullyInitialised,
wgOut 
)

provideTextUseOutputPage MWException::useOutputPage

Definition at line 22 of file MWExceptionTest.php.

References $e, $wgFullyInitialised, $wgLang, $wgOut, array(), and MediaWikiTestCase\setMwGlobals().


The documentation for this class was generated from the following file: